summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-05-19 21:19:12 -0700
committerCraig Topper <craig.topper@sifive.com>2022-05-20 09:30:07 -0700
commit8d3894f67ebf475e4393abeab91736bf534ff8f8 (patch)
treeb65e5c345ecc700584855815006846a9676bbec6 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent1f12718ccfd660f01ac0e444d4632cf8ce6b98e2 (diff)
[TypePromotion] Fix another case for sext vs zext in promoted constant.
If the SafeWrap operation is a subtract, we negated the constant to treat the subtract as an addition. The sext was based on the operation being addition. So we really need to do (neg (sext (neg C))) when promoting the constant. This is equivalent to (sext C) for every value of C except the min signed value. For min signed value we need to do (zext C) instead. Fixes PR55490. Differential Revision: https://reviews.llvm.org/D125653
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions