1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ;RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
4 @a = dso_local global i32 0, align 4
6 ; Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
7 define dso_local i32 @main() #0 {
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: movl $224, %ecx
11 ; CHECK-NEXT: addl a(%rip), %ecx
12 ; CHECK-NEXT: negl %ecx
13 ; CHECK-NEXT: movl $2, %eax
14 ; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx
15 ; CHECK-NEXT: shlq %cl, %rax
16 ; CHECK-NEXT: testl %eax, %eax
17 ; CHECK-NEXT: je .LBB0_1
18 ; CHECK-NEXT: # %bb.2: # %lor.end
19 ; CHECK-NEXT: xorl %eax, %eax
21 ; CHECK-NEXT: .LBB0_1: # %lor.rhs
22 ; CHECK-NEXT: movl a(%rip), %eax
23 ; CHECK-NEXT: xorl %eax, %eax
26 %0 = load volatile i32, ptr @a, align 4
27 %sub = sub i32 -32, %0
28 %sh_prom = zext i32 %sub to i64
29 %shl2 = shl i64 2, %sh_prom
30 %conv = trunc i64 %shl2 to i32
31 %tobool.not = icmp eq i32 %conv, 0
32 br i1 %tobool.not, label %lor.rhs, label %lor.end
34 lor.rhs: ; preds = %entry
35 %1 = load volatile i32, ptr @a, align 4
38 lor.end: ; preds = %lor.rhs, %entry