[llvm] e268ec8 - [InstCombine] add icmp+cast tests for ppc_fp128; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 04:35:10 PDT 2020
Author: Sanjay Patel
Date: 2020-04-07T07:35:01-04:00
New Revision: e268ec8e0d7e81ae8091913a57d3230da44d6a48
URL: https://github.com/llvm/llvm-project/commit/e268ec8e0d7e81ae8091913a57d3230da44d6a48
DIFF: https://github.com/llvm/llvm-project/commit/e268ec8e0d7e81ae8091913a57d3230da44d6a48.diff
LOG: [InstCombine] add icmp+cast tests for ppc_fp128; NFC
See post-commit comments for rG0f56bbc.
Added:
Modified:
llvm/test/Transforms/InstCombine/icmp.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/icmp.ll b/llvm/test/Transforms/InstCombine/icmp.ll
index 41bf661b092e..2da5c696d046 100644
--- a/llvm/test/Transforms/InstCombine/icmp.ll
+++ b/llvm/test/Transforms/InstCombine/icmp.ll
@@ -3697,3 +3697,27 @@ define i1 @signbit_bitcast_fpext_extra_use(float %x, i64* %p) {
%r = icmp slt i64 %b, 0
ret i1 %r
}
+
+define i1 @signbit_bitcast_fpext_ppc_fp128(float %x) {
+; CHECK-LABEL: @signbit_bitcast_fpext_ppc_fp128(
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast float [[X:%.*]] to i32
+; CHECK-NEXT: [[S4:%.*]] = icmp slt i32 [[TMP1]], 0
+; CHECK-NEXT: ret i1 [[S4]]
+;
+ %s2 = fpext float %x to ppc_fp128
+ %s3 = bitcast ppc_fp128 %s2 to i128
+ %s4 = icmp slt i128 %s3, 0
+ ret i1 %s4
+}
+
+define i1 @signbit_bitcast_fptrunc_ppc_fp128(ppc_fp128 %x) {
+; CHECK-LABEL: @signbit_bitcast_fptrunc_ppc_fp128(
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast ppc_fp128 [[X:%.*]] to i128
+; CHECK-NEXT: [[S4:%.*]] = icmp slt i128 [[TMP1]], 0
+; CHECK-NEXT: ret i1 [[S4]]
+;
+ %s2 = fptrunc ppc_fp128 %x to float
+ %s3 = bitcast float %s2 to i32
+ %s4 = icmp slt i32 %s3, 0
+ ret i1 %s4
+}
More information about the llvm-commits
mailing list