[PATCH] make lower-expect understand llvm.expect.i1 for branches
David Majnemer
david.majnemer at gmail.com
Sun Nov 3 00:16:12 PDT 2013
================
Comment at: lib/Transforms/Utils/LowerExpectIntrinsic.cpp:143
@@ -129,2 +142,3 @@
- CmpI->setOperand(0, ArgValue);
+ if (direct) {
+ BI->setCondition(ArgValue);
----------------
Do we need `direct`?
Isn't it just equivalent to `!CmpI`?
Also, no need for the braces around these simple statements.
Something like:
if (CmpI)
CmpI->setOperand(0, ArgValue);
else
BI->setCondition(ArgValue);
http://llvm-reviews.chandlerc.com/D2034
More information about the llvm-commits
mailing list