[PATCH] D39417: InstCombine: Preserve nuw when reassociating nuw ops
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 10:51:43 PST 2017
nlopes added a comment.
This patch LGTM, except for the changes in tryFactorization(). It seems there's some code missing.
https://rise4fun.com/Alive/L2c
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:633
bool HasNSW = false;
- if (isa<OverflowingBinaryOperator>(&I))
+ bool HasNUW = false;
+ if (isa<OverflowingBinaryOperator>(&I)) {
----------------
This variable is never used. It's defined over the next few lines, but never used to set NUW on the instruction.
https://reviews.llvm.org/D39417
More information about the llvm-commits
mailing list