[VectorCombine] add test for x86 target with SSE disabled; NFC
authorSanjay Patel <spatel@rotateright.com>
Wed, 12 Aug 2020 13:15:11 +0000 (09:15 -0400)
committerSanjay Patel <spatel@rotateright.com>
Wed, 12 Aug 2020 13:22:31 +0000 (09:22 -0400)
llvm/test/Transforms/VectorCombine/X86/no-sse.ll [new file with mode: 0644]

diff --git a/llvm/test/Transforms/VectorCombine/X86/no-sse.ll b/llvm/test/Transforms/VectorCombine/X86/no-sse.ll
new file mode 100644 (file)
index 0000000..ccf0e0d
--- /dev/null
@@ -0,0 +1,12 @@
+; RUN: opt < %s -vector-combine -S -mtriple=x86_64-- -mattr=-sse | FileCheck %s --check-prefixes=CHECK
+
+define <4 x float> @bitcast_shuf_same_size(<4 x i32> %v) {
+; CHECK-LABEL: @bitcast_shuf_same_size(
+; CHECK-NEXT:    [[TMP1:%.*]] = bitcast <4 x i32> [[V:%.*]] to <4 x float>
+; CHECK-NEXT:    [[R:%.*]] = shufflevector <4 x float> [[TMP1]], <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
+; CHECK-NEXT:    ret <4 x float> [[R]]
+;
+  %shuf = shufflevector <4 x i32> %v, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
+  %r = bitcast <4 x i32> %shuf to <4 x float>
+  ret <4 x float> %r
+}