[COST][NFC]Add a test for non-power-2 shuffles, NFC.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 28 Apr 2022 15:49:52 +0000 (08:49 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 28 Apr 2022 16:08:28 +0000 (09:08 -0700)
llvm/test/Analysis/CostModel/X86/shuffle-non-pow-2.ll [new file with mode: 0644]

diff --git a/llvm/test/Analysis/CostModel/X86/shuffle-non-pow-2.ll b/llvm/test/Analysis/CostModel/X86/shuffle-non-pow-2.ll
new file mode 100644 (file)
index 0000000..e0f36be
--- /dev/null
@@ -0,0 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
+; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse2 | FileCheck %s
+
+define void @test() {
+; CHECK-LABEL: 'test'
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %matins.2.2 = shufflevector <9 x double> undef, <9 x double> undef, <9 x i32> <i32 0, i32 3, i32 6, i32 1, i32 4, i32 7, i32 2, i32 5, i32 8>
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
+;
+entry:
+  %matins.2.2 = shufflevector <9 x double> undef, <9 x double> undef, <9 x i32> <i32 0, i32 3, i32 6, i32 1, i32 4, i32 7, i32 2, i32 5, i32 8>
+  ret void
+}
+