Skip to content

Commit 3492929

Browse files
committed
Update lit test
1 parent def3b3e commit 3492929

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

llvm/test/Transforms/SeparateConstOffsetFromGEP/AMDGPU/xor-to-or-disjoint.ll

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,6 @@ entry:
7676
ret ptr %gep
7777
}
7878

79-
; Test with non-disjoint bits: Ensure the transformation does not occur
80-
define ptr @test_with_non_disjoint_bits(i64 %val, ptr %ptr) {
81-
; CHECK-LABEL: define ptr @test_with_non_disjoint_bits(
82-
; CHECK-SAME: i64 [[VAL:%.*]], ptr [[PTR:%.*]]) {
83-
; CHECK-NEXT: [[ENTRY:.*:]]
84-
; CHECK-NEXT: [[AND:%.*]] = and i64 [[VAL]], 31
85-
; CHECK-NEXT: [[XOR1:%.*]] = xor i64 [[AND]], 4
86-
; CHECK-NEXT: [[XOR21:%.*]] = or disjoint i64 [[XOR1]], 16
87-
; CHECK-NEXT: [[GEP:%.*]] = getelementptr i8, ptr [[PTR]], i64 [[XOR21]]
88-
; CHECK-NEXT: ret ptr [[GEP]]
89-
;
90-
entry:
91-
%and = and i64 %val, 31 ; val can have bits 0-4 set
92-
%xor1 = xor i64 %and, 4 ; Flips bit 2
93-
%xor2 = xor i64 %and, 20 ; Flips bits 2 and 4, should NOT replace since bit 4 overlaps with possible val bits
94-
%gep = getelementptr i8, ptr %ptr, i64 %xor2
95-
ret ptr %gep
96-
}
97-
9879
; Test with multiple xor operations in sequence
9980
define ptr @test_multiple_xors(ptr %ptr) {
10081
; CHECK-LABEL: define ptr @test_multiple_xors(
@@ -144,8 +125,8 @@ entry:
144125

145126

146127
; Test with multiple xor operations in sequence
147-
define ptr @aatest_multiple_xors(ptr %ptr) {
148-
; CHECK-LABEL: define ptr @aatest_multiple_xors(
128+
define ptr @test_negative_offset(ptr %ptr) {
129+
; CHECK-LABEL: define ptr @test_negative_offset(
149130
; CHECK-SAME: ptr [[PTR:%.*]]) {
150131
; CHECK-NEXT: [[ENTRY:.*:]]
151132
; CHECK-NEXT: [[BASE:%.*]] = add i64 2, 0

0 commit comments

Comments
 (0)