[PATCH] D35292: [SLPVectorizer] Add propagateIRFlagsWithOp() function to propagate IRFlags for specific Operation
Filipe Cabecinhas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 04:05:08 PDT 2017
filcab requested changes to this revision.
filcab added a comment.
This revision now requires changes to proceed.
I haven't reviewed the usages of `propagateIRFlagsWithOp`, but this really needs test cases. Please add them.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:222
+/// Get the intersection (logical and) of all of the potential IR flags
+/// of each scalar operation (VL) that will be converted into a vector (I)
----------------
Does this need doxygen comments, or would a `//` be enough?
Please reformat the comment. The line widths aren't consistent.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:227
+static void propagateIRFlagsWithOp(Value *I, ArrayRef<Value *> VL, Value *OpValue) {
+ if (auto *VecOp = dyn_cast<Instruction>(I)) {
+ auto *Intersection = cast<Instruction>(OpValue);
----------------
Remove indentation levels like you do further in the function:
```
auto *VecOp = dyn_cast<Instruction>(I);
if (!VecOp)
return;
// rest of the function
```
https://reviews.llvm.org/D35292
More information about the llvm-commits
mailing list