This diff fixes issue https://github.com/llvm/llvm-project/issues/59317
We should check if bitwidth is lower than the shift amount before we subtract them to avoid unsigned overflow.
Differential D139238
[ARM] IselLowering unsigned overflow to crash using APInt in PerformSHLSimplify Peter on Dec 2 2022, 5:06 PM. Authored by
Details This diff fixes issue https://github.com/llvm/llvm-project/issues/59317 We should check if bitwidth is lower than the shift amount before we subtract them to avoid unsigned overflow.
Diff Detail
Unit Tests Event Timeline
Comment Actions Update and remove getZExtValue()
|
I'm not sure if you can encounter types > 64 bits here - but you might be better doing the test as