diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2018-11-07 15:27:02 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2018-11-07 15:27:02 +0000 |
| commit | 16a527e7de4ba4a53fbfd1d12eb151dbda7e7e15 (patch) | |
| tree | 90a403ab6b5ebd6b5a9248f6793bcb34cd152c96 /llvm/test/Transforms | |
| parent | 72f76bf2309a0beb4fbc0418a0f71242b530969f (diff) | |
| download | bcm5719-llvm-16a527e7de4ba4a53fbfd1d12eb151dbda7e7e15.tar.gz bcm5719-llvm-16a527e7de4ba4a53fbfd1d12eb151dbda7e7e15.zip | |
[InstCombine] add tests for more fcmp+fabs preds; NFC
llvm-svn: 346323
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/fcmp.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/fcmp.ll b/llvm/test/Transforms/InstCombine/fcmp.ll index c49ed262ab8..de93cff5bec 100644 --- a/llvm/test/Transforms/InstCombine/fcmp.ll +++ b/llvm/test/Transforms/InstCombine/fcmp.ll @@ -197,6 +197,17 @@ define <2 x i1> @fabs_ole(<2 x float> %a) { ret <2 x i1> %cmp } +define <2 x i1> @fabs_ule(<2 x float> %a) { +; CHECK-LABEL: @fabs_ule( +; CHECK-NEXT: [[CALL:%.*]] = call <2 x float> @llvm.fabs.v2f32(<2 x float> [[A:%.*]]) +; CHECK-NEXT: [[CMP:%.*]] = fcmp ninf arcp ule <2 x float> [[CALL]], zeroinitializer +; CHECK-NEXT: ret <2 x i1> [[CMP]] +; + %call = call <2 x float> @llvm.fabs.v2f32(<2 x float> %a) + %cmp = fcmp ninf arcp ule <2 x float> %call, zeroinitializer + ret <2 x i1> %cmp +} + define i1 @fabs_ogt(double %a) { ; CHECK-LABEL: @fabs_ogt( ; CHECK-NEXT: [[CMP:%.*]] = fcmp one double [[A:%.*]], 0.000000e+00 @@ -207,6 +218,17 @@ define i1 @fabs_ogt(double %a) { ret i1 %cmp } +define i1 @fabs_ugt(double %a) { +; CHECK-LABEL: @fabs_ugt( +; CHECK-NEXT: [[CALL:%.*]] = call double @llvm.fabs.f64(double [[A:%.*]]) +; CHECK-NEXT: [[CMP:%.*]] = fcmp reassoc ninf ugt double [[CALL]], 0.000000e+00 +; CHECK-NEXT: ret i1 [[CMP]] +; + %call = call double @llvm.fabs.f64(double %a) + %cmp = fcmp ninf reassoc ugt double %call, 0.0 + ret i1 %cmp +} + define i1 @fabs_oge(double %a) { ; CHECK-LABEL: @fabs_oge( ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord double [[A:%.*]], 0.000000e+00 |

