[all-commits] [llvm/llvm-project] 97ac0c: [InstCombine] fold fcmp with lossy casted constant...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Sat Apr 2 16:23:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97ac0cd6c4e015d89af3db164d6c43fbc6c5ca57
      https://github.com/llvm/llvm-project/commit/97ac0cd6c4e015d89af3db164d6c43fbc6c5ca57
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-04-02 (Sat, 02 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/fcmp.ll

  Log Message:
  -----------
  [InstCombine] fold fcmp with lossy casted constant (2nd try)

This is a retry of 9397bdc67eb2 - that was reverted until
we had a clang warning in place to alert users about a
possible mistake in source. The warning was added with
ab982eace6e4.

This is noted as a missing clang warning in #54222,
but it is also a missing optimization opportunity.

Alive2 proofs:
https://alive2.llvm.org/ce/z/Q8drDq
https://alive2.llvm.org/ce/z/pE6LRt

I don't see a single conversion for all predicates
using "getFCmpCode" logic, so other predicates are
left as a TODO item.




More information about the All-commits mailing list