diff options
author | Craig Topper <craig.topper@sifive.com> | 2022-03-18 18:32:23 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2022-03-19 18:43:14 -0700 |
commit | 268371cf7b9f6fd3b9320564f1abd3615eecd2e8 (patch) | |
tree | 1d8393d024c17e1fb7779939520d5494ee0e8087 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 983ed87c6175dcb270c33b3d65f5454c1f014499 (diff) | |
download | llvm-268371cf7b9f6fd3b9320564f1abd3615eecd2e8.zip llvm-268371cf7b9f6fd3b9320564f1abd3615eecd2e8.tar.gz llvm-268371cf7b9f6fd3b9320564f1abd3615eecd2e8.tar.bz2 |
[RISCV] Add test case for miscompile caused by treating ANY_EXTEND of constants as SIGN_EXTEND.
The code that inserts AssertZExt based on predecessor information assumes
constants are zero extended for phi incoming values this allows
AssertZExt to be created in blocks consuming a Phi.
SelectionDAG::getNode treats any_extend of i32 constants as sext for RISCV.
The code that creates phi incoming values in the predecessors creates an
any_extend for the constants which then gets treated as a sext by getNode.
This makes the AssertZExt incorrect and can cause zexts to be
incorrectly removed.
This bug was introduced by D105918
Differential Revision: https://reviews.llvm.org/D122052
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions