diff options
author | Craig Topper <craig.topper@sifive.com> | 2022-08-03 15:19:03 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2022-08-03 15:19:07 -0700 |
commit | 53d560b22f5b5d91ae5296f030e0ca75a5d2c625 (patch) | |
tree | 2ab0d24e4ea433f349220712de7eb57a93e93906 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 26dd42705c2af0b8f6e5d6cdb32c9bd5ed9524eb (diff) | |
download | llvm-53d560b22f5b5d91ae5296f030e0ca75a5d2c625.zip llvm-53d560b22f5b5d91ae5296f030e0ca75a5d2c625.tar.gz llvm-53d560b22f5b5d91ae5296f030e0ca75a5d2c625.tar.bz2 |
[RISCV] Prevent infinite loop after D129980.
D129980 converts (seteq (i64 (and X, 0xffffffff)), C1) into
(seteq (i64 (sext_inreg X, i32)), C1). If bit 31 of X is 0, it
will be turned back into an 'and' by SimplifyDemandedBits which
can cause an infinite loop.
To prevent this, check if bit 31 is 0 with computeKnownBits before
doing the transformation.
Fixes PR56905.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D131113
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions