diff options
author | Florian Hahn <flo@fhahn.com> | 2022-01-20 13:22:20 +0300 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-01-20 13:22:21 +0300 |
commit | 782c0dd1a1c235afb09a34e7da4a1267ead14765 (patch) | |
tree | e8f78c19b83e3a533f93504d46f0df517e7afd2f /polly | |
parent | 90efbe697a39b201b37da01fc633c51c24de7837 (diff) |
[IRBuilder] Migrate and-folding to value-based FoldAnd.
Similar to the migration of or-folding to FoldOr, there are a few cases
where the fold in IRBuilder::CreateAnd triggered directly. Those have
been updated.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D117431
Diffstat (limited to 'polly')
6 files changed, 14 insertions, 9 deletions
diff --git a/polly/test/CodeGen/invariant_load_base_pointer_conditional.ll b/polly/test/CodeGen/invariant_load_base_pointer_conditional.ll index 987a3ba49dd7..fbf639a385d8 100644 --- a/polly/test/CodeGen/invariant_load_base_pointer_conditional.ll +++ b/polly/test/CodeGen/invariant_load_base_pointer_conditional.ll @@ -3,10 +3,11 @@ ; CHECK-LABEL: polly.preload.begin: ; CHECK-NEXT: %0 = sext i32 %N to i64 ; CHECK-NEXT: %1 = icmp sge i64 %0, 514 +; CHECK-NEXT: %polly.preload.cond.result = and i1 %1, true ; CHECK-NEXT: br label %polly.preload.cond ; ; CHECK-LABEL: polly.preload.cond: -; CHECK-NEXT: br i1 %1, label %polly.preload.exec, label %polly.preload.merge +; CHECK-NEXT: br i1 %polly.preload.cond.result, label %polly.preload.exec, label %polly.preload.merge ; ; CHECK-LABEL: polly.preload.merge: ; CHECK-NEXT: %polly.preload.tmp6.merge = phi i32* [ %polly.access.BPLoc.load, %polly.preload.exec ], [ null, %polly.preload.cond ] diff --git a/polly/test/CodeGen/multidim_2d_parametric_array_static_loop_bounds.ll b/polly/test/CodeGen/multidim_2d_parametric_array_static_loop_bounds.ll index 43b08cdf1c22..481dd32c7f3a 100644 --- a/polly/test/CodeGen/multidim_2d_parametric_array_static_loop_bounds.ll +++ b/polly/test/CodeGen/multidim_2d_parametric_array_static_loop_bounds.ll @@ -12,7 +12,8 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 ; CHECK: entry: ; CHECK: polly.split_new_and_old: ; CHECK: %0 = icmp sge i64 %m, 150 -; CHECK: br i1 %0, label %polly.start, label %for.i +; CHECK: %polly.rtc.result = and i1 %0, true +; CHECK: br i1 %polly.rtc.result, label %polly.start, label %for.i define void @foo(i64 %n, i64 %m, double* %A) { entry: diff --git a/polly/test/CodeGen/no-overflow-tracking.ll b/polly/test/CodeGen/no-overflow-tracking.ll index 697587bcfb11..e58d61b4f8d8 100644 --- a/polly/test/CodeGen/no-overflow-tracking.ll +++ b/polly/test/CodeGen/no-overflow-tracking.ll @@ -30,12 +30,13 @@ ; IR-NEXT: %21 = add nsw i64 %20, %19 ; IR-NEXT: %22 = icmp sge i64 %21, -2147483648 ; IR-NEXT: %23 = and i1 %18, %22 -; IR-NEXT: br label %polly.preload.cond1 +; IR-NEXT: %polly.preload.cond.result1 = and i1 %23, true +; IR-NEXT: br label %polly.preload.cond2 ; -; IR: polly.preload.cond1: -; IR-NEXT: br i1 %23 +; IR: polly.preload.cond2: +; IR-NEXT: br i1 %polly.preload.cond.result1 ; -; IR: polly.preload.exec3: +; IR: polly.preload.exec4: ; IR-NEXT: %polly.access.polly.preload.tmp1.merge = getelementptr i32, i32* %polly.preload.tmp1.merge, i64 0 ; IR-NEXT: %polly.access.polly.preload.tmp1.merge.load = load i32, i32* %polly.access.polly.preload.tmp1.merge, align 4 ; diff --git a/polly/test/CodeGen/run-time-condition-with-scev-parameters.ll b/polly/test/CodeGen/run-time-condition-with-scev-parameters.ll index abbda0e1412f..094e9e1e7b9c 100644 --- a/polly/test/CodeGen/run-time-condition-with-scev-parameters.ll +++ b/polly/test/CodeGen/run-time-condition-with-scev-parameters.ll @@ -15,7 +15,8 @@ ; CHECK-NEXT: %5 = sext i1 %4 to i64 ; CHECK-NEXT: %6 = icmp eq i64 0, %5 ; CHECK-NEXT: %7 = and i1 %2, %6 -; CHECK-NEXT: br i1 %7, label %polly.start, label %for.body4 +; CHECK-NEXT: %polly.rtc.result = and i1 %7, true +; CHECK-NEXT: br i1 %polly.rtc.result, label %polly.start, label %for.body4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/polly/test/ScopInfo/allow-all-parameters-dereferencable.ll b/polly/test/ScopInfo/allow-all-parameters-dereferencable.ll index 0939f4ba2786..6cbf55f6fc4c 100644 --- a/polly/test/ScopInfo/allow-all-parameters-dereferencable.ll +++ b/polly/test/ScopInfo/allow-all-parameters-dereferencable.ll @@ -25,7 +25,7 @@ ; Check that without the option `-polly-allow-dereference-of-all-function-parameters` ; we do generate the runtime check. ; CODE-RTC: polly.preload.cond: ; preds = %polly.preload.begin -; CODE-RTC-NEXT: br i1 %{{[a-zA-Z0-9]*}}, label %polly.preload.exec, label %polly.preload.merge +; CODE-RTC-NEXT: br i1 %{{[a-zA-Z0-9\.]*}}, label %polly.preload.exec, label %polly.preload.merge ; Check that we don't generate a runtime check because we treat all ; parameters as dereferencable. diff --git a/polly/test/ScopInfo/invariant_load_zext_parameter.ll b/polly/test/ScopInfo/invariant_load_zext_parameter.ll index ab2507aa52b2..a19520adfda2 100644 --- a/polly/test/ScopInfo/invariant_load_zext_parameter.ll +++ b/polly/test/ScopInfo/invariant_load_zext_parameter.ll @@ -25,10 +25,11 @@ ; CODEGEN-NEXT: store i32 %polly.access.I0.load, i32* %loadI1a.preload.s2a ; CODEGEN-NEXT: %0 = sext i32 %polly.access.I0.load to i64 ; CODEGEN-NEXT: %1 = icmp eq i64 %0, 0 +; CODEGEN-NEXT: %polly.preload.cond.result = and i1 %1, true ; CODEGEN-NEXT: br label %polly.preload.cond ; ; CODEGEN: polly.preload.cond: -; CODEGEN-NEXT: br i1 %1, label %polly.preload.exec, label %polly.preload.merge +; CODEGEN-NEXT: br i1 %polly.preload.cond.result, label %polly.preload.exec, label %polly.preload.merge ; target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |