On 9/6/24 5:32 AM, Jin Ma wrote:
In the process of DF to SI, we generally use "unsigned_fix" rather than
"truncate" for conversion. Although this has no effect in general,
unexpected ICE often occurs when precise semantic analysis is required.
gcc/ChangeLog:
* config/riscv/riscv.md: Change "truncate" to "unsigned_fix" for
the Zfa extension on rv32.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zfa-fmovh-fmovp-bug.c: New test.
This doesn't look correct.
fmv.x.w just moves the bits from one place to another, no conversion.
So I don't see how the original pattern was correct. Using truncate on
an FP mode source isn't defined. But I also don't think the updated
pattern is correct either.
jeff