aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorVlad Mishel <43666597+vmishelcs@users.noreply.github.com>2024-04-15 22:05:29 -0700
committerGitHub <noreply@github.com>2024-04-16 13:05:29 +0800
commitedb0708dc1ceeaeb3356311a4ddf72a0dc9b224f (patch)
tree9c478501b622cb6d1be5412de132f8b987fc3641 /clang/lib/CodeGen/CodeGenModule.cpp
parent4e2d11f87a595d658f25ec5838b002e4bf5a26fc (diff)
downloadllvm-edb0708dc1ceeaeb3356311a4ddf72a0dc9b224f.zip
llvm-edb0708dc1ceeaeb3356311a4ddf72a0dc9b224f.tar.gz
llvm-edb0708dc1ceeaeb3356311a4ddf72a0dc9b224f.tar.bz2
[InstCombine] Implement `fcmp (fadd x, 0.0), y` => `fcmp x, y` optimization (#88476)
This PR addresses issue #88168. It implements an optimization for the case of ``` define i1 @fcmp_fadd_zero_ugt(float %x, float %y) { %add = fadd float %x, 0.000000e+00 %cmp = fcmp ugt float %add, %y ret i1 %cmp } ``` `=>` ``` define i1 @fcmp_fadd_zero_ugt(float %x, float %y) { %cmp = fcmp ugt float %x, %y ret i1 %cmp } ``` and all other types of `fcmp` instructions (`uge`, `ogt`, etc). Proofs: `fadd x, 0.0` https://alive2.llvm.org/ce/z/7FzNnM `fsub x, 0.0` https://alive2.llvm.org/ce/z/puUxLK
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions