[llvm] [GISel][RISCV] Use isSExtCheaperThanZExt when widening G_ICMP. (PR #120032)

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 15 21:46:05 PST 2024


aemerson wrote:

> > Curious: why is it correct to do a sign-extend for an unsigned comparison promotion?
> 
> eq / ne / true / false aren't really signed or unsigned, you just need to treat the high bits consistently in both operands

Right but those aren't the only conditions potentially being handled here? There's also the `ule, ugt...`

https://github.com/llvm/llvm-project/pull/120032


More information about the llvm-commits mailing list