; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
;RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
@a = dso_local global i32 0, align 4
; Function Attrs: nofree norecurse nounwind uwtable willreturn mustprogress
define dso_local i32 @main() #0 {
; CHECK-LABEL: main:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl $224, %ecx
; CHECK-NEXT: addl a(%rip), %ecx
; CHECK-NEXT: negl %ecx
; CHECK-NEXT: movl $2, %eax
; CHECK-NEXT: # kill: def $cl killed $cl killed $ecx
; CHECK-NEXT: shlq %cl, %rax
; CHECK-NEXT: testl %eax, %eax
; CHECK-NEXT: je .LBB0_1
; CHECK-NEXT: # %bb.2: # %lor.end
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: retq
; CHECK-NEXT: .LBB0_1: # %lor.rhs
; CHECK-NEXT: movl a(%rip), %eax
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: retq
entry:
%0 = load volatile i32, ptr @a, align 4
%sub = sub i32 -32, %0
%sh_prom = zext i32 %sub to i64
%shl2 = shl i64 2, %sh_prom
%conv = trunc i64 %shl2 to i32
%tobool.not = icmp eq i32 %conv, 0
br i1 %tobool.not, label %lor.rhs, label %lor.end
lor.rhs: ; preds = %entry
%1 = load volatile i32, ptr @a, align 4
br label %lor.end
lor.end: ; preds = %lor.rhs, %entry
ret i32 0
}