File: pr49967.ll

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-6~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,418,812 kB
  • sloc: cpp: 5,290,827; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,900; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,892; xml: 953; cs: 573; fortran: 539
file content (54 lines) | stat: -rw-r--r-- 2,329 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -loop-deletion -enable-new-pm=0 < %s | FileCheck %s

; Make sure this does not crash due to incorrect SCEV invalidation (PR49967).

define void @test() {
; CHECK-LABEL: @test(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    br label [[VECTOR_PH:%.*]]
; CHECK:       vector.ph:
; CHECK-NEXT:    br label [[FOR_BODY63:%.*]]
; CHECK:       for.cond.cleanup62:
; CHECK-NEXT:    br i1 true, label [[FOR_BODY151_PREHEADER:%.*]], label [[VECTOR_PH]]
; CHECK:       for.body151.preheader:
; CHECK-NEXT:    br label [[FOR_COND_CLEANUP150_LOOPEXIT:%.*]]
; CHECK:       for.body63:
; CHECK-NEXT:    [[I58_010:%.*]] = phi i16 [ 32, [[VECTOR_PH]] ]
; CHECK-NEXT:    store i16 undef, i16* undef, align 1
; CHECK-NEXT:    [[INC89:%.*]] = add nuw nsw i16 [[I58_010]], 1
; CHECK-NEXT:    [[EXITCOND12_NOT:%.*]] = icmp eq i16 [[INC89]], 33
; CHECK-NEXT:    br i1 [[EXITCOND12_NOT]], label [[FOR_COND_CLEANUP62:%.*]], label [[FOR_BODY63_FOR_BODY63_CRIT_EDGE:%.*]]
; CHECK:       for.body63.for.body63_crit_edge:
; CHECK-NEXT:    unreachable
; CHECK:       for.cond.cleanup150.loopexit:
; CHECK-NEXT:    unreachable
;
entry:
  br label %vector.ph

vector.ph:                                        ; preds = %for.cond.cleanup62, %entry
  br label %for.body63

for.cond.cleanup62:                               ; preds = %for.body63
  br i1 true, label %for.body151.preheader, label %vector.ph

for.body151.preheader:                            ; preds = %for.cond.cleanup62
  br label %for.body151

for.body63:                                       ; preds = %for.body63, %vector.ph
  %i58.010 = phi i16 [ 32, %vector.ph ], [ %inc89, %for.body63 ]
  store i16 undef, i16* undef, align 1
  %inc89 = add nuw nsw i16 %i58.010, 1
  %exitcond12.not = icmp eq i16 %inc89, 33
  br i1 %exitcond12.not, label %for.cond.cleanup62, label %for.body63

for.cond.cleanup150.loopexit:                     ; preds = %for.body151
  unreachable

for.body151:                                      ; preds = %for.body151.preheader, %for.body151
  %i146.29 = phi i16 [ %inc177, %for.body151 ], [ undef, %for.body151.preheader ]
  %inc177 = add nuw nsw i16 %i146.29, 1
  %exitcond.not = icmp eq i16 %inc177, 32
  br i1 %exitcond.not, label %for.cond.cleanup150.loopexit, label %for.body151
}