1 ; RUN: llc < %s -O3 -mtriple=x86_64-- |FileCheck %s
2 define i64 @foo(i1 %z, ptr %p, ptr %q)
4 ; If const 128 is hoisted to a variable, then in basic block L_val2 we would
5 ; have %lshr2 = lshr i192 %data2, %const, and the definition of %const would
6 ; be in another basic block. As a result, a very inefficient code might be
7 ; produced. Here we check that this doesn't occur.
9 %data1 = load i192, ptr %p, align 8
10 %lshr1 = lshr i192 %data1, 128
11 %val1 = trunc i192 %lshr1 to i64
12 br i1 %z, label %End, label %L_val2
14 ; CHECK: movq 16(%rdx), %rax
17 %data2 = load i192, ptr %q, align 8
18 %lshr2 = lshr i192 %data2, 128
19 %val2 = trunc i192 %lshr2 to i64
23 %p1 = phi i64 [%val1,%entry], [%val2,%L_val2]