[PATCH] D57260: Reapply rL352238: [WarnMissedTransforms] Set default to 1.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 28 14:32:18 PST 2019
asbirlea updated this revision to Diff 183960.
asbirlea added a comment.
Mistaken source of the noise, the bug I was chasing was in getOptionalBoolLoopAttribute, called by hasVectorizeTransformation(L).
If the llvm.loop.vectorize exists, but is set to false, hasVectorizeTransformation would return TM_ForcedByUser instead of TM_SuppressedByUser.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57260/new/
https://reviews.llvm.org/D57260
Files:
lib/Transforms/Utils/LoopUtils.cpp
Index: lib/Transforms/Utils/LoopUtils.cpp
===================================================================
--- lib/Transforms/Utils/LoopUtils.cpp
+++ lib/Transforms/Utils/LoopUtils.cpp
@@ -216,7 +216,10 @@
// When the value is absent it is interpreted as 'attribute set'.
return true;
case 2:
- return mdconst::extract_or_null<ConstantInt>(MD->getOperand(1).get());
+ if (ConstantInt *IntMD =
+ mdconst::extract_or_null<ConstantInt>(MD->getOperand(1).get()))
+ return IntMD->getZExtValue();
+ return true;
}
llvm_unreachable("unexpected number of options");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57260.183960.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190128/ac2a65a7/attachment.bin>
More information about the llvm-commits
mailing list