[PATCH] [InstCombine] Add a new formula for SMIN.
David Majnemer
david.majnemer at gmail.com
Wed Apr 29 20:58:18 PDT 2015
Totally righteous, LGTM.
================
Comment at: lib/Transforms/InstCombine/InstCombineSelect.cpp:91
@@ +90,3 @@
+ // Y >s C ? ~Y : ~C == ~Y <s ~C ? ~Y : ~C = SMIN(~Y, ~C)
+ if (ConstantInt *C2 = dyn_cast<ConstantInt>(FalseVal))
+ if (C1->getType() == C2->getType() && ~C1->getValue() == C2->getValue() &&
----------------
Please brace this because it dominates a braced control-flow statement. Also, we can just use `const auto *C2` here, the type is pretty clear.
http://reviews.llvm.org/D9352
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list