riscv64 sign extends signed and unsigned i32 arguments like Mips.
Based on discussion here
https://discourse.llvm.org/t/can-we-preserve-signext-return-attribute-when-converting-memcmp-to-bcmp/67126
I'll work on returns next.
Paths
| Differential D139893
[RISCV] Set ShouldSignExtI32Param in TargetLibraryInfo for riscv64. ClosedPublic Authored by craig.topper on Dec 12 2022, 4:23 PM.
Details Summary riscv64 sign extends signed and unsigned i32 arguments like Mips. Based on discussion here I'll work on returns next.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Dec 12 2022, 4:28 PM Comment Actions So, I guess these have all been getting actually miscompiled on riscv64 up till now? Whoops! This revision was landed with ongoing or failed builds.Dec 12 2022, 4:41 PM Closed by commit rGf58e45717d4c: [RISCV] Set ShouldSignExtI32Param in TargetLibraryInfo for riscv64. (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions
We're fairly aggressive about type legalizing i32 values via sign extension so we might accidentally get it right in a lot of cases.
Revision Contents
Diff 482309 llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/test/Transforms/InstCombine/RISCV/libcall-arg-exts.ll
|