diff options
author | Craig Topper <craig.topper@sifive.com> | 2024-12-06 21:31:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-06 21:31:19 -0800 |
commit | 52646d087cdecd217436b2714f94b84c46b5720a (patch) | |
tree | 43579ffce15c9a10710eaec5b8f787bf96539b33 /llvm/unittests/ProfileData/MemProfTest.cpp | |
parent | 3d6b37e3c3e135f5f25f4f4f1cdb1ffbc6d13c89 (diff) | |
download | llvm-52646d087cdecd217436b2714f94b84c46b5720a.zip llvm-52646d087cdecd217436b2714f94b84c46b5720a.tar.gz llvm-52646d087cdecd217436b2714f94b84c46b5720a.tar.bz2 |
[GISel] Teach computeKnownBitsImpl to handle COPY instructions that change bit width. (#118924)
The sexti32 ComplexRenderFn on RISCV calls computeNumSignBits which
calls computeKnownBits.
I encountered a case where we looked through a G_PHI and found a COPY
that was created from an already selected G_TRUNC from s64 to s32. s32
and s64 integers on RISC-V end up in the same register class. s32 G_PHI
is legal to allow f32 phis on RV64. The COPY inherited the types from the
original G_TRUNC so the source and destination virtual registers have
different widths.
This patch uses KnownBits::anyextOrTrunc to adjust the width when they
mismatch.
Diffstat (limited to 'llvm/unittests/ProfileData/MemProfTest.cpp')
0 files changed, 0 insertions, 0 deletions