[PATCH] D36244: [LoopVectorize] Fix assertion failure in Fcmp vectorization

Matthew Simpson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 10:45:39 PDT 2017


mssimpso added a comment.

Hi Anna,

Thanks for taking a look at this. I had a few comments about the test. Otherwise, it makes sense to me.



================
Comment at: test/Transforms/LoopVectorize/fcmp-vectorize.ll:1
+; RUN: opt -loop-vectorize -S %s | FileCheck %s
+
----------------
Since this is a target-independent test, it's probably a good idea to specify the vector width and interleave factor: `-force-vector-width=4 -force-vector-interleave=1`.


================
Comment at: test/Transforms/LoopVectorize/fcmp-vectorize.ll:3
+
+; REQUIRES: asserts
+; Avoid crashing while trying to vectorize fcmp that can be folded to vector of
----------------
The test doesn't require assertions, so you can remove this line.


================
Comment at: test/Transforms/LoopVectorize/fcmp-vectorize.ll:14-16
+; CHECK-LABEL: loop:
+; CHECK-NEXT:    %iv = phi i32 [ %bc.resume.val, %scalar.ph ], [ %ivnext, %loop ]
+; CHECK-NEXT:    %fcmp = fcmp uno float 0.000000e+00, 0.000000e+00
----------------
No need to check the original loop in this case.


https://reviews.llvm.org/D36244





More information about the llvm-commits mailing list