[all-commits] [llvm/llvm-project] 16da22: [InstCombine] add tests for fcmp with fneg common ...
Sanjay Patel via All-commits
all-commits at lists.llvm.org
Thu Mar 10 09:53:48 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 16da22d45a7c4bfceef0fb54f49f5a2ace2e0911
https://github.com/llvm/llvm-project/commit/16da22d45a7c4bfceef0fb54f49f5a2ace2e0911
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-03-10 (Thu, 10 Mar 2022)
Changed paths:
M llvm/test/Transforms/InstCombine/fabs.ll
M llvm/test/Transforms/InstCombine/fcmp.ll
Log Message:
-----------
[InstCombine] add tests for fcmp with fneg common operand; NFC
Commit: 3491f2f4b0336cdb788fed3ff03a4b31c58db14e
https://github.com/llvm/llvm-project/commit/3491f2f4b0336cdb788fed3ff03a4b31c58db14e
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-03-10 (Thu, 10 Mar 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/fabs.ll
M llvm/test/Transforms/InstCombine/fcmp.ll
Log Message:
-----------
[InstCombine] replace negated operand in fcmp with 0.0
X (any pred) -X --> X (any pred) 0.0
This works with all FP values and preserves FMF.
Alive2 examples:
https://alive2.llvm.org/ce/z/dj6jhp
This can also create one of the patterns that we match as "fabs"
as shown in one of the test diffs.
Compare: https://github.com/llvm/llvm-project/compare/28cfa764c2e3...3491f2f4b033
More information about the All-commits
mailing list