Skip to content
Commit 49775e01 authored by David Majnemer's avatar David Majnemer
Browse files

InstCombine: Don't unconditionally preserve 'nuw' when shrinking constants

Consider:
  %add = add nuw i32 %a, -16777216
  %and = and i32 %add, 255

Regardless of whether or not we demand the sign bit of %add, we cannot
replace -16777216 with 2130706432 without also removing 'nuw' from the
instruction.

llvm-svn: 216273
parent 19ecd635
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment