26 lines · plain
1; RUN: llc < %s -O3 -mtriple=x86_64-- |FileCheck %s2define i64 @foo(i1 %z, ptr %p, ptr %q)3{4; If const 128 is hoisted to a variable, then in basic block L_val2 we would5; have %lshr2 = lshr i192 %data2, %const, and the definition of %const would6; be in another basic block. As a result, a very inefficient code might be7; produced. Here we check that this doesn't occur.8entry:9 %data1 = load i192, ptr %p, align 810 %lshr1 = lshr i192 %data1, 12811 %val1 = trunc i192 %lshr1 to i6412 br i1 %z, label %End, label %L_val213 14; CHECK: movq 16(%rdx), %rax15; CHECK-NEXT: retq16L_val2:17 %data2 = load i192, ptr %q, align 818 %lshr2 = lshr i192 %data2, 12819 %val2 = trunc i192 %lshr2 to i6420 br label %End21 22End:23 %p1 = phi i64 [%val1,%entry], [%val2,%L_val2]24 ret i64 %p125}26