[llvm] [WebAssembly] Fix trunc in FastISel (PR #138479)
Pavel Verigo via llvm-commits
llvm-commits at lists.llvm.org
Tue May 6 08:24:01 PDT 2025
pavelverigo wrote:
@sunfishcode
Yes, that's correct. FastISel does bail out on "odd-sized" bitwidths. Specifically, `getRegForValue` returns 0 for unsupported types, which causes `selectTrunc` to fail early.
That said, the resulting type being non-simple (like i48) is still fine from FastISel's perspective, as we're just returning a register for it. The updated logic only correctly applies needed wrapping if the result is <= 32 bits.
https://github.com/llvm/llvm-project/pull/138479
More information about the llvm-commits
mailing list