[llvm] c7b815a - [SLP][NFC]Add a test for vectorization of stores with float constants,

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 10:22:47 PDT 2022


Author: Alexey Bataev
Date: 2022-08-26T10:22:07-07:00
New Revision: c7b815a5108683525a98309d391a3f076a7bd456

URL: https://github.com/llvm/llvm-project/commit/c7b815a5108683525a98309d391a3f076a7bd456
DIFF: https://github.com/llvm/llvm-project/commit/c7b815a5108683525a98309d391a3f076a7bd456.diff

LOG: [SLP][NFC]Add a test for vectorization of stores with float constants,
NFC.

Added: 
    llvm/test/Transforms/SLPVectorizer/X86/stores_constant_float.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/stores_constant_float.ll b/llvm/test/Transforms/SLPVectorizer/X86/stores_constant_float.ll
new file mode 100644
index 000000000000..64cc63ba8580
--- /dev/null
+++ b/llvm/test/Transforms/SLPVectorizer/X86/stores_constant_float.ll
@@ -0,0 +1,19 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -mtriple=x86_64-unknown-linux-gnu -slp-vectorizer -mcpu=skylake -S -o - %s | FileCheck %s
+
+define void @foo() {
+; CHECK-LABEL: @foo(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[C:%.*]] = alloca { double, double }, align 8
+; CHECK-NEXT:    [[C_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i64 0, i32 1
+; CHECK-NEXT:    store double 0.000000e+00, ptr [[C]], align 8
+; CHECK-NEXT:    store double 1.000000e+00, ptr [[C_IMAGP]], align 8
+; CHECK-NEXT:    ret void
+;
+entry:
+  %c = alloca { double, double }, align 8
+  %c.imagp = getelementptr inbounds { double, double }, ptr %c, i64 0, i32 1
+  store double 0.000000e+00, ptr %c, align 8
+  store double 1.000000e+00, ptr %c.imagp, align 8
+  ret void
+}


        


More information about the llvm-commits mailing list