[PATCH] Select Elimination in InstCombine

David Majnemer david.majnemer at gmail.com
Thu Sep 11 15:46:53 PDT 2014


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:2953-2954
@@ +2952,4 @@
+            unsigned ReplaceWithOpd = 0;
+            if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(Op2))
+              if (CI->getValue().getBoolValue())
+                // Example:
----------------
I think this reads easier as: `!CI->isZero()`

Speaking of which, why is it bad if the constant is zero?

http://reviews.llvm.org/D5258






More information about the llvm-commits mailing list