[llvm] 48b901b - Add tests to Transforms/CodeGenPrepare/X86/freeze-cmp.ll before commiting D76048
Juneyoung Lee via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 01:18:52 PDT 2020
Author: Juneyoung Lee
Date: 2020-03-13T17:18:42+09:00
New Revision: 48b901b0e1b66bfcc748f0c3584528a6efc6d239
URL: https://github.com/llvm/llvm-project/commit/48b901b0e1b66bfcc748f0c3584528a6efc6d239
DIFF: https://github.com/llvm/llvm-project/commit/48b901b0e1b66bfcc748f0c3584528a6efc6d239.diff
LOG: Add tests to Transforms/CodeGenPrepare/X86/freeze-cmp.ll before commiting D76048
Added:
llvm/test/Transforms/CodeGenPrepare/X86/freeze-cmp.ll
Modified:
Removed:
llvm/test/Transforms/CodeGenPrepare/X86/freeze-icmp.ll
################################################################################
diff --git a/llvm/test/Transforms/CodeGenPrepare/X86/freeze-icmp.ll b/llvm/test/Transforms/CodeGenPrepare/X86/freeze-cmp.ll
similarity index 67%
rename from llvm/test/Transforms/CodeGenPrepare/X86/freeze-icmp.ll
rename to llvm/test/Transforms/CodeGenPrepare/X86/freeze-cmp.ll
index 4505464a6a55..419491cde8d6 100644
--- a/llvm/test/Transforms/CodeGenPrepare/X86/freeze-icmp.ll
+++ b/llvm/test/Transforms/CodeGenPrepare/X86/freeze-cmp.ll
@@ -71,5 +71,38 @@ B:
ret void
}
+define i1 @ptrcmp(i8* %p) {
+; CHECK-LABEL: @ptrcmp(
+; CHECK-NEXT: [[C:%.*]] = icmp eq i8* [[P:%.*]], null
+; CHECK-NEXT: [[FR:%.*]] = freeze i1 [[C]]
+; CHECK-NEXT: ret i1 [[FR]]
+;
+ %c = icmp eq i8* %p, null
+ %fr = freeze i1 %c
+ ret i1 %fr
+}
+
+
+define i1 @fcmp(float %a) {
+; CHECK-LABEL: @fcmp(
+; CHECK-NEXT: [[C:%.*]] = fcmp oeq float [[A:%.*]], 0.000000e+00
+; CHECK-NEXT: [[FR:%.*]] = freeze i1 [[C]]
+; CHECK-NEXT: ret i1 [[FR]]
+;
+ %c = fcmp oeq float %a, 0.0
+ %fr = freeze i1 %c
+ ret i1 %fr
+}
+
+define i1 @fcmp_nan(float %a) {
+; CHECK-LABEL: @fcmp_nan(
+; CHECK-NEXT: [[C:%.*]] = fcmp nnan oeq float [[A:%.*]], 0.000000e+00
+; CHECK-NEXT: [[FR:%.*]] = freeze i1 [[C]]
+; CHECK-NEXT: ret i1 [[FR]]
+;
+ %c = fcmp nnan oeq float %a, 0.0
+ %fr = freeze i1 %c
+ ret i1 %fr
+}
declare void @g1()
declare void @g2()
More information about the llvm-commits
mailing list