180 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=X863; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=X644 5define <4 x i32> @add_4i32(<4 x i32> %a0, <4 x i32> %a1) {6; X86-LABEL: add_4i32:7; X86: # %bb.0:8; X86-NEXT: paddd %xmm1, %xmm09; X86-NEXT: retl10;11; X64-LABEL: add_4i32:12; X64: # %bb.0:13; X64-NEXT: paddd %xmm1, %xmm014; X64-NEXT: retq15 %1 = add <4 x i32> %a0, <i32 1, i32 -2, i32 3, i32 -4>16 %2 = add <4 x i32> %a1, <i32 -1, i32 2, i32 -3, i32 4>17 %3 = add <4 x i32> %1, %218 ret <4 x i32> %319}20 21define <4 x i32> @add_4i32_commute(<4 x i32> %a0, <4 x i32> %a1) {22; X86-LABEL: add_4i32_commute:23; X86: # %bb.0:24; X86-NEXT: paddd %xmm1, %xmm025; X86-NEXT: retl26;27; X64-LABEL: add_4i32_commute:28; X64: # %bb.0:29; X64-NEXT: paddd %xmm1, %xmm030; X64-NEXT: retq31 %1 = add <4 x i32> <i32 1, i32 -2, i32 3, i32 -4>, %a032 %2 = add <4 x i32> <i32 -1, i32 2, i32 -3, i32 4>, %a133 %3 = add <4 x i32> %1, %234 ret <4 x i32> %335}36 37define <4 x i32> @mul_4i32(<4 x i32> %a0, <4 x i32> %a1) {38; X86-LABEL: mul_4i32:39; X86: # %bb.0:40; X86-NEXT: pmulld %xmm1, %xmm041; X86-NEXT: pmulld {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0 # [4,6,6,4]42; X86-NEXT: retl43;44; X64-LABEL: mul_4i32:45; X64: # %bb.0:46; X64-NEXT: pmulld %xmm1, %xmm047; X64-NEXT: pmulld {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 # [4,6,6,4]48; X64-NEXT: retq49 %1 = mul <4 x i32> %a0, <i32 1, i32 2, i32 3, i32 4>50 %2 = mul <4 x i32> %a1, <i32 4, i32 3, i32 2, i32 1>51 %3 = mul <4 x i32> %1, %252 ret <4 x i32> %353}54 55define <4 x i32> @mul_4i32_commute(<4 x i32> %a0, <4 x i32> %a1) {56; X86-LABEL: mul_4i32_commute:57; X86: # %bb.0:58; X86-NEXT: pmulld %xmm1, %xmm059; X86-NEXT: pmulld {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0 # [4,6,6,4]60; X86-NEXT: retl61;62; X64-LABEL: mul_4i32_commute:63; X64: # %bb.0:64; X64-NEXT: pmulld %xmm1, %xmm065; X64-NEXT: pmulld {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 # [4,6,6,4]66; X64-NEXT: retq67 %1 = mul <4 x i32> <i32 1, i32 2, i32 3, i32 4>, %a068 %2 = mul <4 x i32> <i32 4, i32 3, i32 2, i32 1>, %a169 %3 = mul <4 x i32> %1, %270 ret <4 x i32> %371}72 73define <4 x i32> @and_4i32(<4 x i32> %a0, <4 x i32> %a1) {74; X86-LABEL: and_4i32:75; X86: # %bb.0:76; X86-NEXT: andps %xmm1, %xmm077; X86-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm078; X86-NEXT: retl79;80; X64-LABEL: and_4i32:81; X64: # %bb.0:82; X64-NEXT: andps %xmm1, %xmm083; X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm084; X64-NEXT: retq85 %1 = and <4 x i32> %a0, <i32 -2, i32 -2, i32 3, i32 3>86 %2 = and <4 x i32> %a1, <i32 -1, i32 -1, i32 1, i32 1>87 %3 = and <4 x i32> %1, %288 ret <4 x i32> %389}90 91define <4 x i32> @and_4i32_commute(<4 x i32> %a0, <4 x i32> %a1) {92; X86-LABEL: and_4i32_commute:93; X86: # %bb.0:94; X86-NEXT: andps %xmm1, %xmm095; X86-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm096; X86-NEXT: retl97;98; X64-LABEL: and_4i32_commute:99; X64: # %bb.0:100; X64-NEXT: andps %xmm1, %xmm0101; X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0102; X64-NEXT: retq103 %1 = and <4 x i32> <i32 -2, i32 -2, i32 3, i32 3>, %a0104 %2 = and <4 x i32> <i32 -1, i32 -1, i32 1, i32 1>, %a1105 %3 = and <4 x i32> %1, %2106 ret <4 x i32> %3107}108 109define <4 x i32> @or_4i32(<4 x i32> %a0, <4 x i32> %a1) {110; X86-LABEL: or_4i32:111; X86: # %bb.0:112; X86-NEXT: orps %xmm1, %xmm0113; X86-NEXT: orps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0114; X86-NEXT: retl115;116; X64-LABEL: or_4i32:117; X64: # %bb.0:118; X64-NEXT: orps %xmm1, %xmm0119; X64-NEXT: orps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0120; X64-NEXT: retq121 %1 = or <4 x i32> %a0, <i32 -2, i32 -2, i32 3, i32 3>122 %2 = or <4 x i32> %a1, <i32 -1, i32 -1, i32 1, i32 1>123 %3 = or <4 x i32> %1, %2124 ret <4 x i32> %3125}126 127define <4 x i32> @or_4i32_commute(<4 x i32> %a0, <4 x i32> %a1) {128; X86-LABEL: or_4i32_commute:129; X86: # %bb.0:130; X86-NEXT: orps %xmm1, %xmm0131; X86-NEXT: orps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0132; X86-NEXT: retl133;134; X64-LABEL: or_4i32_commute:135; X64: # %bb.0:136; X64-NEXT: orps %xmm1, %xmm0137; X64-NEXT: orps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0138; X64-NEXT: retq139 %1 = or <4 x i32> <i32 -2, i32 -2, i32 3, i32 3>, %a0140 %2 = or <4 x i32> <i32 -1, i32 -1, i32 1, i32 1>, %a1141 %3 = or <4 x i32> %1, %2142 ret <4 x i32> %3143}144 145define <4 x i32> @xor_4i32(<4 x i32> %a0, <4 x i32> %a1) {146; X86-LABEL: xor_4i32:147; X86: # %bb.0:148; X86-NEXT: xorps %xmm1, %xmm0149; X86-NEXT: xorps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0150; X86-NEXT: retl151;152; X64-LABEL: xor_4i32:153; X64: # %bb.0:154; X64-NEXT: xorps %xmm1, %xmm0155; X64-NEXT: xorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0156; X64-NEXT: retq157 %1 = xor <4 x i32> %a0, <i32 -2, i32 -2, i32 3, i32 3>158 %2 = xor <4 x i32> %a1, <i32 -1, i32 -1, i32 1, i32 1>159 %3 = xor <4 x i32> %1, %2160 ret <4 x i32> %3161}162 163define <4 x i32> @xor_4i32_commute(<4 x i32> %a0, <4 x i32> %a1) {164; X86-LABEL: xor_4i32_commute:165; X86: # %bb.0:166; X86-NEXT: xorps %xmm1, %xmm0167; X86-NEXT: xorps {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0168; X86-NEXT: retl169;170; X64-LABEL: xor_4i32_commute:171; X64: # %bb.0:172; X64-NEXT: xorps %xmm1, %xmm0173; X64-NEXT: xorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0174; X64-NEXT: retq175 %1 = xor <4 x i32> <i32 -2, i32 -2, i32 3, i32 3>, %a0176 %2 = xor <4 x i32> <i32 -1, i32 -1, i32 1, i32 1>, %a1177 %3 = xor <4 x i32> %1, %2178 ret <4 x i32> %3179}180