Mercurial > hg > CbC > CbC_llvm
comparison llvm/test/Transforms/LICM/pr42969.ll @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | 79ff65ed7e25 |
children | 1f2b6ac9f198 |
comparison
equal
deleted
inserted
replaced
232:70dce7da266c | 236:c4bab56944e8 |
---|---|
1 ; RUN: opt %s -S -scoped-noalias-aa -enable-mssa-loop-dependency=true -licm | FileCheck %s | 1 ; RUN: opt %s -S -licm | FileCheck %s |
2 | 2 |
3 define i16 @main(i1 %a_b_mayalias, i16* %a, i16* %b) { | 3 define i16 @main(i1 %a_b_mayalias, ptr %a, ptr %b) { |
4 ; CHECK: scalar.body: | 4 ; CHECK: scalar.body: |
5 ; CHECK-NEXT: [[J:%.*]] = phi i64 | 5 ; CHECK-NEXT: [[J:%.*]] = phi i64 |
6 ; CHECK-NEXT: [[TMP3:%.*]] = load i16 | 6 ; CHECK-NEXT: [[TMP3:%.*]] = load i16 |
7 ; CHECK-NEXT: [[RESULT:%.*]] = add i16 [[TMP3]], 1 | 7 ; CHECK-NEXT: [[RESULT:%.*]] = add i16 [[TMP3]], 1 |
8 ; CHECK-NEXT: store i16 [[RESULT]] | 8 ; CHECK-NEXT: store i16 [[RESULT]] |
15 %i = phi i16 [ 0, %entry ], [ %i.next, %scalar.cleanup ] | 15 %i = phi i16 [ 0, %entry ], [ %i.next, %scalar.cleanup ] |
16 br i1 %a_b_mayalias, label %scalar.ph, label %vector.ph | 16 br i1 %a_b_mayalias, label %scalar.ph, label %vector.ph |
17 | 17 |
18 vector.ph: ; preds = %outer | 18 vector.ph: ; preds = %outer |
19 ; MemoryUse(4) MayAlias | 19 ; MemoryUse(4) MayAlias |
20 %tmp1 = load i16, i16* %a, align 1, !alias.scope !0, !tbaa !7 | 20 %tmp1 = load i16, ptr %a, align 1, !alias.scope !0, !tbaa !7 |
21 %tmp2 = add i16 %tmp1, 1 | 21 %tmp2 = add i16 %tmp1, 1 |
22 ; 1 = MemoryDef(4) | 22 ; 1 = MemoryDef(4) |
23 store i16 %tmp2, i16* %b, align 1, !alias.scope !3, !noalias !0, !tbaa !7 | 23 store i16 %tmp2, ptr %b, align 1, !alias.scope !3, !noalias !0, !tbaa !7 |
24 br label %vector.body | 24 br label %vector.body |
25 | 25 |
26 vector.body: ; preds = %vector.body, %vector.ph | 26 vector.body: ; preds = %vector.body, %vector.ph |
27 %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.ph ] | 27 %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.ph ] |
28 %index.next = add i64 %index, 1 | 28 %index.next = add i64 %index, 1 |
39 | 39 |
40 scalar.body: ; preds = %scalar.body, %scalar.ph | 40 scalar.body: ; preds = %scalar.body, %scalar.ph |
41 ; 3 = MemoryPhi({scalar.ph,5},{scalar.body,2}) | 41 ; 3 = MemoryPhi({scalar.ph,5},{scalar.body,2}) |
42 %j = phi i64 [ %j.next, %scalar.body ], [ %j.start, %scalar.ph ] | 42 %j = phi i64 [ %j.next, %scalar.body ], [ %j.start, %scalar.ph ] |
43 ; MemoryUse(3) MayAlias | 43 ; MemoryUse(3) MayAlias |
44 %tmp3 = load i16, i16* %a, align 1, !tbaa !7 | 44 %tmp3 = load i16, ptr %a, align 1, !tbaa !7 |
45 %result = add i16 %tmp3, 1 | 45 %result = add i16 %tmp3, 1 |
46 ; 2 = MemoryDef(3) | 46 ; 2 = MemoryDef(3) |
47 store i16 %result, i16* %b, align 1, !tbaa !7 | 47 store i16 %result, ptr %b, align 1, !tbaa !7 |
48 %j.next = add nuw nsw i64 %j, 1 | 48 %j.next = add nuw nsw i64 %j, 1 |
49 %cmp2 = icmp ult i64 %j.next, 20 | 49 %cmp2 = icmp ult i64 %j.next, 20 |
50 br i1 %cmp2, label %scalar.body, label %scalar.cleanup | 50 br i1 %cmp2, label %scalar.body, label %scalar.cleanup |
51 | 51 |
52 scalar.cleanup: ; preds = %scalar.body | 52 scalar.cleanup: ; preds = %scalar.body |