aboutsummaryrefslogtreecommitdiff
path: root/polly/test
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2024-02-09 12:02:59 +0000
committerGitHub <noreply@github.com>2024-02-09 12:02:59 +0000
commitb5a273a1cfe6f509f8d2541e04d9186438f33348 (patch)
treeae41e566fcd52ba1c5f9cdf219ec659b8df2ac29 /polly/test
parent316373abcc2abde414d4b9601f4752b6939a2133 (diff)
downloadllvm-b5a273a1cfe6f509f8d2541e04d9186438f33348.zip
llvm-b5a273a1cfe6f509f8d2541e04d9186438f33348.tar.gz
llvm-b5a273a1cfe6f509f8d2541e04d9186438f33348.tar.bz2
[Polly][DebugInfo] Use getStableDebugLoc to avoid intrinsic-dependent behaviour (#81246)
Polly currently uses `getDebugLoc` in a few places to produce diagnostic output; this is correct when interacting with specific instructions, but may be incorrect when dealing with instruction ranges if debug intrinsics are included. As a general rule, the debug locations attached to debug intrinsics may be misleading compared to the surrounding instructions, and are not generally used for anything other than determining variable scope info; the recommended approach is therefore to use `getStableDebugLoc` instead, which skips over debug intrinsics. This is necessary to fix test failures that occur when enabling non-instruction debug info, which removes debug intrinsics from basic blocks and thus alters the diagnostic output of Polly (despite causing no functional change).
Diffstat (limited to 'polly/test')
-rw-r--r--polly/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll8
-rw-r--r--polly/test/ScopDetectionDiagnostics/loop_has_multiple_exits.ll2
2 files changed, 5 insertions, 5 deletions
diff --git a/polly/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll b/polly/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll
index 6182371..35986b5 100644
--- a/polly/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll
+++ b/polly/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll
@@ -19,20 +19,20 @@
; If we reject non-affine loops the non-affine loop bound will be reported:
;
-; REJECTNONAFFINELOOPS: remark: ReportLoopBound-01.c:1:12: The following errors keep this region from being a Scop.
+; REJECTNONAFFINELOOPS: remark: ReportLoopBound-01.c:2:8: The following errors keep this region from being a Scop.
; REJECTNONAFFINELOOPS: remark: ReportLoopBound-01.c:2:8: Failed to derive an affine function from the loop bounds.
; REJECTNONAFFINELOOPS: remark: ReportLoopBound-01.c:3:5: Invalid Scop candidate ends here.
; If we allow non-affine loops the non-affine access will be reported:
;
-; ALLOWNONAFFINELOOPS: remark: ReportLoopBound-01.c:1:12: The following errors keep this region from being a Scop.
+; ALLOWNONAFFINELOOPS: remark: ReportLoopBound-01.c:2:8: The following errors keep this region from being a Scop.
; ALLOWNONAFFINELOOPS: remark: ReportLoopBound-01.c:3:5: The array subscript of "A" is not affine
; ALLOWNONAFFINELOOPS: remark: ReportLoopBound-01.c:3:5: Invalid Scop candidate ends here.
; If we allow non-affine loops and non-affine accesses the region will be reported as not profitable:
;
-; ALLOWNONAFFINEALL: remark: ReportLoopBound-01.c:1:12: The following errors keep this region from being a Scop.
-; ALLOWNONAFFINEALL: remark: ReportLoopBound-01.c:1:12: No profitable polyhedral optimization found
+; ALLOWNONAFFINEALL: remark: ReportLoopBound-01.c:2:8: The following errors keep this region from being a Scop.
+; ALLOWNONAFFINEALL: remark: ReportLoopBound-01.c:2:8: No profitable polyhedral optimization found
; ALLOWNONAFFINEALL: remark: ReportLoopBound-01.c:3:5: Invalid Scop candidate ends here.
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/polly/test/ScopDetectionDiagnostics/loop_has_multiple_exits.ll b/polly/test/ScopDetectionDiagnostics/loop_has_multiple_exits.ll
index 7661bd0..a0f2704 100644
--- a/polly/test/ScopDetectionDiagnostics/loop_has_multiple_exits.ll
+++ b/polly/test/ScopDetectionDiagnostics/loop_has_multiple_exits.ll
@@ -2,7 +2,7 @@
;
; Derived from test-suite/MultiSource/Benchmarks/BitBench/uuencode/uuencode.c
;
-; CHECK: remark: uuencode.c:75:18: The following errors keep this region from being a Scop.
+; CHECK: remark: uuencode.c:76:13: The following errors keep this region from being a Scop.
; CHECK: remark: uuencode.c:83:3: Loop cannot be handled because it has multiple exits.
; CHECK: remark: uuencode.c:95:21: Invalid Scop candidate ends here.