[clang] [llvm] [RISCV][ISel] Ensure 'in X' Constraints prevent X0 (PR #112563)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 11:43:43 PDT 2024
topperc wrote:
> I spent some time trying to write a test that should fail before, but doesn't after, but it doesn't happen - I presume because x0 is reasonably dealt with by the allocator. This maybe suggests the patch isn't needed? I'm not sure why we do this for GPRs then.
I think the original issue was copy propagation folding "mv a0, x0" into an inline assembly source as "x0". The instruction being used in the assembly was one that treated x0 as a special encoding. So there was a difference between x0 and a register containing the value 0.
https://github.com/llvm/llvm-project/pull/112563
More information about the cfe-commits
mailing list