aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-04-09 08:32:42 -0700
committerCraig Topper <craig.topper@sifive.com>2022-04-09 08:52:15 -0700
commit70046438d02ba1ec6bc2e2fc496b610cc1068b0f (patch)
tree5e71dfbcee6fc631a67758257ae799da3ac0b583 /clang/lib/Frontend/TestModuleFileExtension.cpp
parent5d0f2cf660ce89c298fb24b8f59f3c267b06eb93 (diff)
downloadllvm-70046438d02ba1ec6bc2e2fc496b610cc1068b0f.zip
llvm-70046438d02ba1ec6bc2e2fc496b610cc1068b0f.tar.gz
llvm-70046438d02ba1ec6bc2e2fc496b610cc1068b0f.tar.bz2
[RISCV] Only try LUI+SH*ADD+ADDI for int materialization if LUI+ADDI+SH*ADD failed.
There's an assert in LUI+SH*ADD+ADDI materialization that makes sure the lower 12 bits aren't zero since that case should have been handled as LUI+ADDI+SH*ADD. But nothing prevented the LUI+SH*ADD+ADDI checks from running after the earlier code handled it. The sequence would be the same length or longer so it wouldn't replace the earlier sequence, but the assert happened before that was checked. The vector holding the sequence also wasn't reset before the second check so that guaranteed the sequence would never be found to be shorter. This patch fixes this by only trying the second expansion when the earlier fails. Fixes PR54812. Reviewed By: benshi001 Differential Revision: https://reviews.llvm.org/D123406
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions