Revert r149110 and add a testcase that was crashing since that revision.
[oota-llvm.git] / test / CodeGen / X86 / constant-pool-sharing.ll
1 ; RUN-disable: llc < %s -mtriple=x86_64-linux | FileCheck %s
2 ; RUN-disable: llc < %s -mtriple=x86_64-win32 | FileCheck %s
3 ; RUN: true
4
5 ; llc should share constant pool entries between this integer vector
6 ; and this floating-point vector since they have the same encoding.
7
8 ; CHECK:  LCPI0_0(%rip), %xmm0
9 ; CHECK:  movaps        %xmm0, ({{%rdi|%rcx}})
10 ; CHECK:  movaps        %xmm0, ({{%rsi|%rdx}})
11
12 define void @foo(<4 x i32>* %p, <4 x float>* %q, i1 %t) nounwind {
13 entry:
14   br label %loop
15 loop:
16   store <4 x i32><i32 1073741824, i32 1073741824, i32 1073741824, i32 1073741824>, <4 x i32>* %p
17   store <4 x float><float 2.0, float 2.0, float 2.0, float 2.0>, <4 x float>* %q
18   br i1 %t, label %loop, label %ret
19 ret:
20   ret void
21 }