[llvm] [NFC][LV] Improve ee with sideeffects legality test (PR #158275)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 16 05:12:15 PDT 2025
================
@@ -604,36 +604,31 @@ exit:
;; ICE was caused by assert for the load used in the uncountable exit condition
;; being guaranteed to execute.
- at e = external addrspace(21) global [4 x i8]
-define void @crash_conditional_load_for_uncountable_exit() {
+ at ee.global = external global [4 x i8]
+define void @crash_conditional_load_for_uncountable_exit(ptr dereferenceable(40) noalias %store.area) {
; CHECK-LABEL: LV: Checking a loop in 'crash_conditional_load_for_uncountable_exit'
; CHECK: LV: Not vectorizing: Load for uncountable exit not guaranteed to execute.
entry:
- br label %cont
-
-handler.out_of_bounds:
- unreachable
+ br label %for.body
-cont:
- %h.06 = phi i64 [ 0, %entry ], [ %inc, %a.exit ]
- %arrayidx = getelementptr i8, ptr addrspace(21) @e, i64 %h.06
- br i1 false, label %cont1, label %handler.type_mismatch
+for.body:
+ %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.inc ]
+ %ee.addr = getelementptr i8, ptr @ee.global, i64 %iv
+ br i1 false, label %ee.block, label %invalid.block
----------------
huntergr-arm wrote:
Providing the condition via argument dropped out earlier with `Cannot vectorize early exit loop with more than one early exit`. Disabling that check bails out at `Cannot vectorize potentially faulting early exit loop`. Disabling that check as well will give us the crash. So I'll add it as part of the second test, but I don't think we would have hit it before.
https://github.com/llvm/llvm-project/pull/158275
More information about the llvm-commits
mailing list