Skip to content

Commit 1fc6027

Browse files
committed
[InstCombine] add/adjust test comments; NFC
Follow-up to post-commit comment: https://reviews.llvm.org/rG23a116c8c446
1 parent de07b1e commit 1fc6027

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/test/Transforms/InstCombine/lshr-trunc-sext-to-ashr-sext.ll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ define i16 @t2(i7 %x) {
4747
ret i16 %c
4848
}
4949

50+
; negative test - shift amount doesn't match trunc amount
51+
5052
define i16 @n3(i8 %x) {
5153
; CHECK-LABEL: @n3(
5254
; CHECK-NEXT: [[A:%.*]] = lshr i8 [[X:%.*]], 3
@@ -84,7 +86,7 @@ define <2 x i16> @t5_vec_undef(<2 x i8> %x) {
8486
ret <2 x i16> %c
8587
}
8688

87-
; TODO: We could convert both uses of %a to ashr.
89+
; TODO: We could convert %a to ashr and eliminate 2nd use of %b.
8890

8991
define i16 @t6_extrause0(i8 %x) {
9092
; CHECK-LABEL: @t6_extrause0(
@@ -101,7 +103,7 @@ define i16 @t6_extrause0(i8 %x) {
101103
ret i16 %c
102104
}
103105

104-
; TODO: We could convert both uses of %a to ashr.
106+
; TODO: We could convert %a to ashr and eliminate 2nd use of %b.
105107

106108
define <2 x i16> @t7_extrause0_vec_undef(<2 x i8> %x) {
107109
; CHECK-LABEL: @t7_extrause0_vec_undef(
@@ -118,7 +120,7 @@ define <2 x i16> @t7_extrause0_vec_undef(<2 x i8> %x) {
118120
ret <2 x i16> %c
119121
}
120122

121-
; TODO: We could convert both uses of %a to ashr.
123+
; TODO: We could convert %a to ashr + mask (and) and eliminate %b.
122124

123125
define i16 @t8_extrause1(i8 %x) {
124126
; CHECK-LABEL: @t8_extrause1(
@@ -135,7 +137,7 @@ define i16 @t8_extrause1(i8 %x) {
135137
ret i16 %c
136138
}
137139

138-
; TODO: We could convert both uses of %a to ashr.
140+
; TODO: We could convert %a to ashr + mask (and) and eliminate %b.
139141

140142
define <2 x i16> @t9_extrause1_vec_undef(<2 x i8> %x) {
141143
; CHECK-LABEL: @t9_extrause1_vec_undef(

0 commit comments

Comments
 (0)