]> granicus.if.org Git - llvm/commit
[TargetLowering] SimplifyDemandedBits ADD/SUB/MUL - correctly inherit SDNodeFlags...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 30 Aug 2019 17:58:55 +0000 (17:58 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 30 Aug 2019 17:58:55 +0000 (17:58 +0000)
commit5bfcd8dbf04018b4ed85965c63031b399bfa6611
tree1ac8f07e7793c428ac3920db992ff2fd91c2bfea
parentf8eb5406ab4fecd2cfea64b7efbd90dc69742838
[TargetLowering] SimplifyDemandedBits ADD/SUB/MUL - correctly inherit SDNodeFlags from the original node.

Just disable NSW/NUW flags. This matches what we're already doing for the other situations for these nodes, it was just missed for the demanded constant case.

Noticed by inspection - confirmed in offline discussion with @spatel. I've checked we have test coverage in the x86 extract-bits.ll and extract-lowbits.ll tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370497 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp