[llvm] Inst combine optimize unneded float to int cast when icmp (PR #155501)

Artem Trokhymchuk via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 14:45:36 PDT 2025


trokhymchuk wrote:

Looks like I also need advice: current implementation relies upon the fact that constant is **always** second argument to the `icmp` and I was unable to thwart the canonicalization, because when I used constant in the 'thwart instruction' I just got constant folded result and 'thwarting' did not change the order of operands, and I am unsure how to thwart correctly or should I support reverse order at all.

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


More information about the llvm-commits mailing list