[llvm] [InstCombine] Optimize unneeded float to int cast when icmp (PR #155501)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 7 04:46:18 PDT 2025


dtcxzyw wrote:

> icmp sgt (fptosi %x), <negative> -> fcmp ogt %x, <negative>: https://alive2.llvm.org/ce/z/isTzu2

You should use `%neg = icmp slt i8 %C, 0`.


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


More information about the llvm-commits mailing list