[llvm] [InstCombine] Extend fcmp+select folding to minnum/maxnum intrinsics (PR #112088)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 10:31:50 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 76007138f4ffd4e0f510d12b5e8cad529c21f24d 1713edf3bb089296013f6fd6acd088bc17dd1dc8 --extensions h,cpp -- llvm/include/llvm/IR/PatternMatch.h llvm/lib/Analysis/IVDescriptors.cpp llvm/lib/Analysis/ValueTracking.cpp llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp llvm/unittests/IR/PatternMatch.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/IR/PatternMatch.cpp b/llvm/unittests/IR/PatternMatch.cpp
index bd4a102666..367ba6ab52 100644
--- a/llvm/unittests/IR/PatternMatch.cpp
+++ b/llvm/unittests/IR/PatternMatch.cpp
@@ -1159,7 +1159,7 @@ TEST_F(PatternMatchTest, FloatingPointMax) {
// [OU]LE with inverted select.
EXPECT_TRUE(m_OrdOrUnordFMax(m_Value(MatchL), m_Value(MatchR))
- .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), R, L)));
+ .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), R, L)));
EXPECT_TRUE(m_OrdOrUnordFMax(m_Value(MatchL), m_Value(MatchR))
.match(IRB.CreateSelect(IRB.CreateFCmpULE(L, R), R, L)));
EXPECT_EQ(L, MatchL);
@@ -1167,7 +1167,7 @@ TEST_F(PatternMatchTest, FloatingPointMax) {
// [OUT]LT with inverted select.
EXPECT_TRUE(m_OrdOrUnordFMax(m_Value(MatchL), m_Value(MatchR))
- .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), R, L)));
+ .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), R, L)));
EXPECT_TRUE(m_OrdOrUnordFMax(m_Value(MatchL), m_Value(MatchR))
.match(IRB.CreateSelect(IRB.CreateFCmpULT(L, R), R, L)));
EXPECT_EQ(L, MatchL);
``````````
</details>
https://github.com/llvm/llvm-project/pull/112088
More information about the llvm-commits
mailing list