[llvm] 83586a6 - [Test] Rename some negative tests into positive with required freeze
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 02:17:56 PST 2023
Author: Max Kazantsev
Date: 2023-03-10T17:17:38+07:00
New Revision: 83586a61b162f3860df7f865c8e88cbb9c23b742
URL: https://github.com/llvm/llvm-project/commit/83586a61b162f3860df7f865c8e88cbb9c23b742
DIFF: https://github.com/llvm/llvm-project/commit/83586a61b162f3860df7f865c8e88cbb9c23b742.diff
LOG: [Test] Rename some negative tests into positive with required freeze
In fact, we can optimize this cases, it will just take us insertion of freeze.
Added:
Modified:
llvm/test/Transforms/LICM/min_max.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LICM/min_max.ll b/llvm/test/Transforms/LICM/min_max.ll
index 725d086183de..d47f2d174a0e 100644
--- a/llvm/test/Transforms/LICM/min_max.ll
+++ b/llvm/test/Transforms/LICM/min_max.ll
@@ -745,10 +745,10 @@ exit:
ret i32 %iv
}
-; Do not turn to umin: non-poison of %inv_1 and %inv_2 is not guaranteed.
+; TODO: inv_2 needs freeze because hoisted umax would create a new use that didn't exist before.
; Counter-example: %cmp_1 = false, %inv_2 = poison.
-define i32 @test_logical_and_ult_neg(i32 %start, i32 %inv_1, i32 %inv_2) {
-; CHECK-LABEL: @test_logical_and_ult_neg(
+define i32 @test_logical_and_ult_needs_freeze(i32 %start, i32 %inv_1, i32 %inv_2) {
+; CHECK-LABEL: @test_logical_and_ult_needs_freeze(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[LOOP:%.*]]
; CHECK: loop:
@@ -809,10 +809,9 @@ exit:
ret i32 %iv
}
-; Do not turn to umin: non-poison of %inv_1 and %inv_2 is not guaranteed.
-; Counter-example: %cmp_1 = true, %inv_2 = poison.
-define i32 @test_logical_or_ult_inv_neg(i32 %start, i32 %inv_1, i32 %inv_2) {
-; CHECK-LABEL: @test_logical_or_ult_inv_neg(
+; TODO: inv_2 needs freeze because hoisted umax would create a new use that didn't exist before.
+define i32 @test_logical_or_ult_inv_needs_freeze(i32 %start, i32 %inv_1, i32 %inv_2) {
+; CHECK-LABEL: @test_logical_or_ult_inv_needs_freeze(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[LOOP:%.*]]
; CHECK: loop:
More information about the llvm-commits
mailing list