[PATCH] D21672: [LICM] Avoid repeating expensive call while promoting loads. NFC
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 05:45:51 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL273671: [LICM] Avoid repeating expensive call while promoting loads. NFC (authored by annat).
Changed prior to commit:
http://reviews.llvm.org/D21672?vs=61751&id=61781#toc
Repository:
rL LLVM
http://reviews.llvm.org/D21672
Files:
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
Index: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp
@@ -945,15 +945,16 @@
// instruction will be executed, update the alignment.
// Larger is better, with the exception of 0 being the best alignment.
unsigned InstAlignment = Store->getAlignment();
- if ((InstAlignment > Alignment || InstAlignment == 0) && Alignment != 0)
+ if ((InstAlignment > Alignment || InstAlignment == 0) &&
+ Alignment != 0) {
if (isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo)) {
GuaranteedToExecute = true;
Alignment = InstAlignment;
}
-
- if (!GuaranteedToExecute)
+ } else if (!GuaranteedToExecute) {
GuaranteedToExecute =
isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo);
+ }
if (!GuaranteedToExecute && !CanSpeculateLoad) {
CanSpeculateLoad = isDereferenceableAndAlignedPointer(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21672.61781.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160624/1fff73ed/attachment.bin>
More information about the llvm-commits
mailing list