--- /dev/null
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mattr=+sse4.1 | FileCheck %s\r
+\r
+define <4 x i32> @add_4i32(<4 x i32> %a0, <4 x i32> %a1) {\r
+ ;CHECK-LABEL: @add_4i32\r
+ ;CHECK: # BB#0:\r
+ ;CHECK-NEXT: paddd %xmm1, %xmm0\r
+ ;CHECK-NEXT: retq\r
+ %1 = add <4 x i32> %a0, <i32 1, i32 -2, i32 3, i32 -4>\r
+ %2 = add <4 x i32> %a1, <i32 -1, i32 2, i32 -3, i32 4>\r
+ %3 = add <4 x i32> %1, %2\r
+ ret <4 x i32> %3\r
+}\r
+\r
+define <4 x i32> @mul_4i32(<4 x i32> %a0, <4 x i32> %a1) {\r
+ ;CHECK-LABEL: @mul_4i32\r
+ ;CHECK: # BB#0:\r
+ ;CHECK-NEXT: pmulld %xmm1, %xmm0\r
+ ;CHECK-NEXT: pmulld .LCPI1_0(%rip), %xmm0\r
+ ;CHECK-NEXT: retq\r
+ %1 = mul <4 x i32> %a0, <i32 1, i32 2, i32 3, i32 4>\r
+ %2 = mul <4 x i32> %a1, <i32 4, i32 3, i32 2, i32 1>\r
+ %3 = mul <4 x i32> %1, %2\r
+ ret <4 x i32> %3\r
+}\r
+\r
+define <4 x i32> @and_4i32(<4 x i32> %a0, <4 x i32> %a1) {\r
+ ;CHECK-LABEL: @and_4i32\r
+ ;CHECK: # BB#0:\r
+ ;CHECK-NEXT: andps %xmm1, %xmm0\r
+ ;CHECK-NEXT: andps .LCPI2_0(%rip), %xmm0\r
+ ;CHECK-NEXT: retq\r
+ %1 = and <4 x i32> %a0, <i32 -2, i32 -2, i32 3, i32 3>\r
+ %2 = and <4 x i32> %a1, <i32 -1, i32 -1, i32 1, i32 1>\r
+ %3 = and <4 x i32> %1, %2\r
+ ret <4 x i32> %3\r
+}\r
+\r
+define <4 x i32> @or_4i32(<4 x i32> %a0, <4 x i32> %a1) {\r
+ ;CHECK-LABEL: @or_4i32\r
+ ;CHECK: # BB#0:\r
+ ;CHECK-NEXT: orps %xmm1, %xmm0\r
+ ;CHECK-NEXT: orps .LCPI3_0(%rip), %xmm0\r
+ ;CHECK-NEXT: retq\r
+ %1 = or <4 x i32> %a0, <i32 -2, i32 -2, i32 3, i32 3>\r
+ %2 = or <4 x i32> %a1, <i32 -1, i32 -1, i32 1, i32 1>\r
+ %3 = or <4 x i32> %1, %2\r
+ ret <4 x i32> %3\r
+}\r
+\r
+define <4 x i32> @xor_4i32(<4 x i32> %a0, <4 x i32> %a1) {\r
+ ;CHECK-LABEL: @xor_4i32\r
+ ;CHECK: # BB#0:\r
+ ;CHECK-NEXT: xorps %xmm1, %xmm0\r
+ ;CHECK-NEXT: xorps .LCPI4_0(%rip), %xmm0\r
+ ;CHECK-NEXT: retq\r
+ %1 = xor <4 x i32> %a0, <i32 -2, i32 -2, i32 3, i32 3>\r
+ %2 = xor <4 x i32> %a1, <i32 -1, i32 -1, i32 1, i32 1>\r
+ %3 = xor <4 x i32> %1, %2\r
+ ret <4 x i32> %3\r
+}\r