Dale Johannesen | 215a564 | 2008-03-10 17:33:57 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep movaps |
| 2 | ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep esp | count 2 |
Chris Lattner | 66a4dda | 2008-03-09 05:42:06 +0000 | [diff] [blame] | 3 | |
| 4 | ; These should both generate something like this: |
| 5 | ;_test3: |
| 6 | ; movl $1234567, %eax |
| 7 | ; andl 4(%esp), %eax |
| 8 | ; movd %eax, %xmm0 |
| 9 | ; ret |
| 10 | |
Evan Cheng | 18950d9 | 2008-05-07 22:59:08 +0000 | [diff] [blame] | 11 | define <2 x i64> @test3(i64 %arg) nounwind { |
Chris Lattner | 66a4dda | 2008-03-09 05:42:06 +0000 | [diff] [blame] | 12 | entry: |
| 13 | %A = and i64 %arg, 1234567 |
| 14 | %B = insertelement <2 x i64> zeroinitializer, i64 %A, i32 0 |
| 15 | ret <2 x i64> %B |
| 16 | } |
| 17 | |
Evan Cheng | 18950d9 | 2008-05-07 22:59:08 +0000 | [diff] [blame] | 18 | define <2 x i64> @test2(i64 %arg) nounwind { |
Chris Lattner | 66a4dda | 2008-03-09 05:42:06 +0000 | [diff] [blame] | 19 | entry: |
| 20 | %A = and i64 %arg, 1234567 |
| 21 | %B = insertelement <2 x i64> undef, i64 %A, i32 0 |
| 22 | ret <2 x i64> %B |
| 23 | } |
| 24 | |