41 lines · plain
1; RUN: opt < %s -passes=instcombine -S | FileCheck %s2 3 4@i = constant i32 1, align 45@f = constant float 0x3FF19999A0000000, align 46@cmp = common global i32 0, align 47@resf = common global ptr null, align 88@resi = common global ptr null, align 89 10define i32 @foo() {11entry:12 br label %while.cond13 14while.cond:15 %res.0 = phi ptr [ null, %entry ], [ @i, %if.then ], [ @f, %if.else ]16 %0 = load i32, ptr @cmp, align 417 %shr = ashr i32 %0, 118 store i32 %shr, ptr @cmp, align 419 %tobool = icmp ne i32 %shr, 020 br i1 %tobool, label %while.body, label %while.end21 22while.body:23 %and = and i32 %shr, 124 %tobool1 = icmp ne i32 %and, 025 br i1 %tobool1, label %if.then, label %if.else26 27if.then:28 br label %while.cond29 30if.else:31 br label %while.cond32 33while.end:34 store ptr %res.0, ptr @resf, align 835 store ptr %res.0, ptr @resi, align 836 ret i32 037 38; CHECK-NOT: bitcast i3239}40 41