Skip to content

Commit ba702aa

Browse files
committed
[InstSimplify] Regenerate test checks (NFC)
1 parent aa1e912 commit ba702aa

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed
Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
; RUN: opt -passes=instcombine -S -o - %s | FileCheck %s
2-
; Test that we don't replace an alias with its aliasee when simplifying GEPs.
3-
; In this test case the transformation is invalid because it replaces the
4-
; reference to the symbol "b" (which refers to whichever instance of "b"
5-
; was chosen by the linker) with a reference to "a" (which refers to the
6-
; specific instance of "b" in this module).
7-
8-
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9-
target triple = "x86_64-unknown-linux-gnu"
10-
11-
@a = internal global [3 x ptr] zeroinitializer
12-
@b = linkonce_odr alias [3 x ptr], ptr @a
13-
14-
define ptr @f() {
15-
; CHECK: ret ptr getelementptr ([3 x ptr], ptr @b, i64 0, i64 1)
16-
ret ptr getelementptr ([3 x ptr], ptr @b, i64 0, i64 1)
17-
}
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2+
; RUN: opt -passes=instcombine -S -o - %s | FileCheck %s
3+
; Test that we don't replace an alias with its aliasee when simplifying GEPs.
4+
; In this test case the transformation is invalid because it replaces the
5+
; reference to the symbol "b" (which refers to whichever instance of "b"
6+
; was chosen by the linker) with a reference to "a" (which refers to the
7+
; specific instance of "b" in this module).
8+
9+
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10+
target triple = "x86_64-unknown-linux-gnu"
11+
12+
@a = internal global [3 x ptr] zeroinitializer
13+
@b = linkonce_odr alias [3 x ptr], ptr @a
14+
15+
define ptr @f() {
16+
; CHECK-LABEL: define ptr @f() {
17+
; CHECK-NEXT: ret ptr getelementptr ([3 x ptr], ptr @b, i64 0, i64 1)
18+
;
19+
ret ptr getelementptr ([3 x ptr], ptr @b, i64 0, i64 1)
20+
}

llvm/test/Transforms/InstSimplify/past-the-end.ll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by update_test_checks.py
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
22
; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
33
target datalayout = "p:32:32"
44

@@ -11,7 +11,7 @@ target datalayout = "p:32:32"
1111

1212
define zeroext i1 @no_offsets() {
1313
; CHECK-LABEL: @no_offsets(
14-
; CHECK: ret i1 false
14+
; CHECK-NEXT: ret i1 false
1515
;
1616
%t = icmp eq ptr @opte_a, @opte_b
1717
ret i1 %t
@@ -21,7 +21,7 @@ define zeroext i1 @no_offsets() {
2121

2222
define zeroext i1 @both_past_the_end() {
2323
; CHECK-LABEL: @both_past_the_end(
24-
; CHECK: ret i1 icmp eq (ptr getelementptr inbounds (i32, ptr @opte_a, i32 1), ptr getelementptr inbounds (i32, ptr @opte_b, i32 1))
24+
; CHECK-NEXT: ret i1 icmp eq (ptr getelementptr inbounds (i32, ptr @opte_a, i32 1), ptr getelementptr inbounds (i32, ptr @opte_b, i32 1))
2525
;
2626
%x = getelementptr i32, ptr @opte_a, i32 1
2727
%y = getelementptr i32, ptr @opte_b, i32 1
@@ -35,7 +35,7 @@ define zeroext i1 @both_past_the_end() {
3535

3636
define zeroext i1 @just_one_past_the_end() {
3737
; CHECK-LABEL: @just_one_past_the_end(
38-
; CHECK: ret i1 icmp eq (ptr getelementptr inbounds (i32, ptr @opte_a, i32 1), ptr @opte_b)
38+
; CHECK-NEXT: ret i1 icmp eq (ptr getelementptr inbounds (i32, ptr @opte_a, i32 1), ptr @opte_b)
3939
;
4040
%x = getelementptr i32, ptr @opte_a, i32 1
4141
%t = icmp eq ptr %x, @opte_b
@@ -46,7 +46,7 @@ define zeroext i1 @just_one_past_the_end() {
4646

4747
define zeroext i1 @no_alloca_offsets() {
4848
; CHECK-LABEL: @no_alloca_offsets(
49-
; CHECK: ret i1 false
49+
; CHECK-NEXT: ret i1 false
5050
;
5151
%m = alloca i32
5252
%n = alloca i32
@@ -73,8 +73,8 @@ define zeroext i1 @both_past_the_end_alloca() {
7373

7474
define zeroext i1 @just_one_past_the_end_alloca() {
7575
; CHECK-LABEL: @just_one_past_the_end_alloca(
76-
; CHECK: [[M:%.*]] = alloca i32
77-
; CHECK-NEXT: [[N:%.*]] = alloca i32
76+
; CHECK-NEXT: [[M:%.*]] = alloca i32, align 4
77+
; CHECK-NEXT: [[N:%.*]] = alloca i32, align 4
7878
; CHECK-NEXT: [[X:%.*]] = getelementptr i32, ptr [[M]], i32 1
7979
; CHECK-NEXT: [[T:%.*]] = icmp eq ptr [[X]], [[N]]
8080
; CHECK-NEXT: ret i1 [[T]]

0 commit comments

Comments
 (0)