[llvm] [X86][GlobalISel] Enable scalar versions of G_UITOFP and G_FPTOUI (PR #100079)

Evgenii Kudriashov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 17:56:49 PDT 2024


e-kud wrote:

> I think this is fine as-is to make progress, but I think this needs to be cleaned up in a follow up. I would suggest either emitting explicit clamping code and having an x86 combine match the instruction behavior, or introduce another G_* node with the clamping behavior and let other targets lower that with the clamp code

@arsenm I'm not sure if a new opcode is a good idea. x86 version clamps everything, that is out of bounds, to `80000000_00000000H`. So to make it work, we need to introduce an opcode for generic clamping to the specified value or values.
 

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


More information about the llvm-commits mailing list