[PATCH] D11918: Constant propagation after hiting assume(icmp)
Piotr Padlewski via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 15:17:04 PDT 2015
Prazek marked 9 inline comments as done.
================
Comment at: lib/Transforms/Scalar/GVN.cpp:2240
@@ +2239,3 @@
+ // Propagate equality only if only one of operand is const.
+ if ((LhsConst != nullptr) ^ (RhsConst != nullptr)) {
+ for (BasicBlock *successor : successors(I->getParent())) {
----------------
majnemer wrote:
> This could be written more concisely as: `!LHSConst != !RHSConst`. The xor is a little out of place considering you aren't doing anything with bits.
!LHSConst != !RHSConst looks bad to me. I can change it to LHSConst != RHSConst
http://reviews.llvm.org/D11918
More information about the llvm-commits
mailing list