1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=i386-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X86 3; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X64 4 5; These should both generate something like this: 6;_test3: 7; movl $1234567, %eax 8; andl 4(%esp), %eax 9; movd %eax, %xmm0 10; ret 11 12define <2 x i64> @test3(i64 %arg) nounwind { 13; X86-LABEL: test3: 14; X86: # %bb.0: 15; X86-NEXT: movl $1234567, %eax # imm = 0x12D687 16; X86-NEXT: andl {{[0-9]+}}(%esp), %eax 17; X86-NEXT: movd %eax, %xmm0 18; X86-NEXT: retl 19; 20; X64-LABEL: test3: 21; X64: # %bb.0: 22; X64-NEXT: andl $1234567, %edi # imm = 0x12D687 23; X64-NEXT: movq %rdi, %xmm0 24; X64-NEXT: retq 25 %A = and i64 %arg, 1234567 26 %B = insertelement <2 x i64> zeroinitializer, i64 %A, i32 0 27 ret <2 x i64> %B 28} 29 30define <2 x i64> @test2(i64 %arg) nounwind { 31; X86-LABEL: test2: 32; X86: # %bb.0: 33; X86-NEXT: movl $1234567, %eax # imm = 0x12D687 34; X86-NEXT: andl {{[0-9]+}}(%esp), %eax 35; X86-NEXT: movd %eax, %xmm0 36; X86-NEXT: retl 37; 38; X64-LABEL: test2: 39; X64: # %bb.0: 40; X64-NEXT: andl $1234567, %edi # imm = 0x12D687 41; X64-NEXT: movq %rdi, %xmm0 42; X64-NEXT: retq 43 %A = and i64 %arg, 1234567 44 %B = insertelement <2 x i64> undef, i64 %A, i32 0 45 ret <2 x i64> %B 46} 47