[all-commits] [llvm/llvm-project] b9b74f: InstCombine: Add baseline tests for fcmp and selec...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Mon Nov 7 07:17:01 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b9b74fc6e98a6e9bd50a1882b839419c9a6577b2
https://github.com/llvm/llvm-project/commit/b9b74fc6e98a6e9bd50a1882b839419c9a6577b2
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2022-11-07 (Mon, 07 Nov 2022)
Changed paths:
A llvm/test/Transforms/InstCombine/fcmp-denormals-are-zero.ll
Log Message:
-----------
InstCombine: Add baseline tests for fcmp and select on denormal range
A future change will try to fold (if input denormals are treated as 0)
fcmp olt fabs(x), smallest_normalized_number -> fcmp oeq x, 0.0
fcmp ult fabs(x), smallest_normalized_number -> fcmp ueq x, 0.0
fcmp oge fabs(x), smallest_normalized_number -> fcmp one x, 0.0
fcmp ult fabs(x), smallest_normalized_number -> fcmp ueq x, 0.0
Commit: 0f68ffe1e2b2d4b518aebe14709aff253658cfb2
https://github.com/llvm/llvm-project/commit/0f68ffe1e2b2d4b518aebe14709aff253658cfb2
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2022-11-07 (Mon, 07 Nov 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/fcmp-denormals-are-zero.ll
Log Message:
-----------
InstCombine: Fold compare with smallest normal if input denormals are flushed
Try to simplify comparisons with the smallest normalized value. If
denormals will be treated as 0, we can simplify by using an equality
comparison with 0.
fcmp olt fabs(x), smallest_normalized_number -> fcmp oeq x, 0.0
fcmp ult fabs(x), smallest_normalized_number -> fcmp ueq x, 0.0
fcmp oge fabs(x), smallest_normalized_number -> fcmp one x, 0.0
fcmp ult fabs(x), smallest_normalized_number -> fcmp ueq x, 0.0
The device libraries have a few range checks that look like
this for denormal handling paths.
Compare: https://github.com/llvm/llvm-project/compare/80378a4ca725...0f68ffe1e2b2
More information about the All-commits
mailing list