1 ; RUN: llc -relocation-model=pic < %s -mtriple=ve-unknown-unknown | FileCheck %s
3 @dst = internal unnamed_addr global i32 0, align 4
4 @src = internal unnamed_addr global i1 false, align 4
5 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
10 ; CHECK-NEXT: st %s15, 24(, %s11)
11 ; CHECK-NEXT: st %s16, 32(, %s11)
12 ; CHECK-NEXT: lea %s15, _GLOBAL_OFFSET_TABLE_@pc_lo(-24)
13 ; CHECK-NEXT: and %s15, %s15, (32)0
14 ; CHECK-NEXT: sic %s16
15 ; CHECK-NEXT: lea.sl %s15, _GLOBAL_OFFSET_TABLE_@pc_hi(%s16, %s15)
16 ; CHECK-NEXT: lea %s0, src@gotoff_lo
17 ; CHECK-NEXT: and %s0, %s0, (32)0
18 ; CHECK-NEXT: lea.sl %s0, src@gotoff_hi(, %s0)
19 ; CHECK-NEXT: ld1b.zx %s0, (%s0, %s15)
20 ; CHECK-NEXT: lea %s1, 100
21 ; CHECK-NEXT: cmov.w.eq %s1, (0)1, %s0
22 ; CHECK-NEXT: lea %s0, dst@gotoff_lo
23 ; CHECK-NEXT: and %s0, %s0, (32)0
24 ; CHECK-NEXT: lea.sl %s0, dst@gotoff_hi(, %s0)
25 ; CHECK-NEXT: stl %s1, (%s0, %s15)
26 ; CHECK-NEXT: ld %s16, 32(, %s11)
27 ; CHECK-NEXT: ld %s15, 24(, %s11)
28 ; CHECK-NEXT: b.l.t (, %s10)
30 %1 = load i1, ptr @src, align 4
31 %2 = select i1 %1, i32 100, i32 0
32 store i32 %2, ptr @dst, align 4
36 ; Function Attrs: nounwind
39 ; CHECK: .LBB{{[0-9]+}}_2:
40 ; CHECK-NEXT: lea %s15, _GLOBAL_OFFSET_TABLE_@pc_lo(-24)
41 ; CHECK-NEXT: and %s15, %s15, (32)0
42 ; CHECK-NEXT: sic %s16
43 ; CHECK-NEXT: lea.sl %s15, _GLOBAL_OFFSET_TABLE_@pc_hi(%s16, %s15)
44 ; CHECK-NEXT: lea %s0, src@gotoff_lo
45 ; CHECK-NEXT: and %s0, %s0, (32)0
46 ; CHECK-NEXT: lea.sl %s0, src@gotoff_hi(, %s0)
47 ; CHECK-NEXT: or %s1, 1, (0)1
48 ; CHECK-NEXT: st1b %s1, (%s0, %s15)
49 ; CHECK-NEXT: lea %s12, func@plt_lo(-24)
50 ; CHECK-NEXT: and %s12, %s12, (32)0
51 ; CHECK-NEXT: sic %s16
52 ; CHECK-NEXT: lea.sl %s12, func@plt_hi(%s16, %s12)
53 ; CHECK-NEXT: bsic %s10, (, %s12)
54 ; CHECK-NEXT: lea %s0, dst@gotoff_lo
55 ; CHECK-NEXT: and %s0, %s0, (32)0
56 ; CHECK-NEXT: lea.sl %s0, dst@gotoff_hi(, %s0)
57 ; CHECK-NEXT: ldl.sx %s1, (%s0, %s15)
58 ; CHECK-NEXT: st %s1, 184(, %s11)
59 ; CHECK-NEXT: lea %s0, .L.str@gotoff_lo
60 ; CHECK-NEXT: and %s0, %s0, (32)0
61 ; CHECK-NEXT: lea.sl %s0, .L.str@gotoff_hi(%s0, %s15)
62 ; CHECK-NEXT: lea %s12, printf@plt_lo(-24)
63 ; CHECK-NEXT: and %s12, %s12, (32)0
64 ; CHECK-NEXT: sic %s16
65 ; CHECK-NEXT: lea.sl %s12, printf@plt_hi(%s16, %s12)
66 ; CHECK-NEXT: st %s0, 176(, %s11)
67 ; CHECK-NEXT: bsic %s10, (, %s12)
68 ; CHECK-NEXT: or %s0, 0, (0)1
69 ; CHECK-NEXT: or %s11, 0, %s9
70 store i1 true, ptr @src, align 4
71 tail call void @func()
72 %1 = load i32, ptr @dst, align 4
73 %2 = tail call i32 (ptr, ...) @printf(ptr @.str, i32 %1)
77 declare i32 @printf(ptr nocapture readonly, ...)