1 ; Basic sanity test to check that instruction operands are encoded with
3 ; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s
5 ; CHECK: FUNCTION_BLOCK
6 ; CHECK: INST_BINOP {{.*}}op0=1 op1=1
7 ; CHECK: INST_BINOP {{.*}}op0=1 op1=1
8 ; CHECK: INST_BINOP {{.*}}op0=1 op1=1
9 ; CHECK: INST_RET {{.*}}op0=1
10 define i32 @test_int_binops(i32 %a) nounwind {
19 ; CHECK: FUNCTION_BLOCK
20 ; CHECK: INST_CAST {{.*}}op0=1
21 ; CHECK: INST_BINOP {{.*}}op0=1 op1=1
22 ; CHECK: INST_BINOP {{.*}}op0=1 op1=1
23 ; CHECK: INST_BINOP {{.*}}op0=1 op1=1
24 ; CHECK: INST_BINOP {{.*}}op0=1 op1=1
25 ; CHECK: INST_RET {{.*}}op0=1
26 define double @test_float_binops(i32 %a) nounwind {
27 %1 = sitofp i32 %a to double
28 %2 = fadd double %1, %1
29 %3 = fsub double %2, %2
30 %4 = fmul double %3, %3
31 %5 = fdiv double %4, %4
36 ; CHECK: FUNCTION_BLOCK
37 ; skip checking operands of INST_INBOUNDS_GEP since that depends on ordering
38 ; between literals and the formal parameters.
39 ; CHECK: INST_INBOUNDS_GEP {{.*}}
40 ; CHECK: INST_LOAD {{.*}}op0=1 {{.*}}
41 ; CHECK: INST_CMP2 op0=1 {{.*}}
42 ; CHECK: INST_RET {{.*}}op0=1
43 define i1 @test_load(i32 %a, {i32, i32}* %ptr) nounwind {
45 %0 = getelementptr inbounds {i32, i32}* %ptr, i32 %a, i32 0
47 %2 = icmp eq i32 %1, %a