[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
Tue Sep 10 17:32:51 PDT 2024


e-kud wrote:

> You can't really directly rely on known target instruction behavior and still use the regular G_* opcodes. Other optimizations could do something assuming the poison behavior

Yes, this is true, thank you for noticing this! Updated version uses the lowering from the helper. The problem with `X86cvtts2Int` is that there are patterns only for vector form in contrast to `fp_to_sint`. We currently struggle with it in GlobalISel.

Probably I could've hacked it by `GINodeEquiv<G_CVTTS2INT, fp_to_sint>` but I'm inclined to think that target specific opcodes should be mapped to target specific nodes.

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


More information about the llvm-commits mailing list