[llvm] 1fc6027 - [InstCombine] add/adjust test comments; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 06:05:01 PDT 2021


Author: Sanjay Patel
Date: 2021-06-04T09:04:53-04:00
New Revision: 1fc6027406c51fcbe0cb83c92c92e16ddd9aca43

URL: https://github.com/llvm/llvm-project/commit/1fc6027406c51fcbe0cb83c92c92e16ddd9aca43
DIFF: https://github.com/llvm/llvm-project/commit/1fc6027406c51fcbe0cb83c92c92e16ddd9aca43.diff

LOG: [InstCombine] add/adjust test comments; NFC

Follow-up to post-commit comment:
https://reviews.llvm.org/rG23a116c8c446

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstCombine/lshr-trunc-sext-to-ashr-sext.ll b/llvm/test/Transforms/InstCombine/lshr-trunc-sext-to-ashr-sext.ll
index 1af708ea5d91..7556ad395b87 100644
--- a/llvm/test/Transforms/InstCombine/lshr-trunc-sext-to-ashr-sext.ll
+++ b/llvm/test/Transforms/InstCombine/lshr-trunc-sext-to-ashr-sext.ll
@@ -47,6 +47,8 @@ define i16 @t2(i7 %x) {
   ret i16 %c
 }
 
+; negative test - shift amount doesn't match trunc amount
+
 define i16 @n3(i8 %x) {
 ; CHECK-LABEL: @n3(
 ; CHECK-NEXT:    [[A:%.*]] = lshr i8 [[X:%.*]], 3
@@ -84,7 +86,7 @@ define <2 x i16> @t5_vec_undef(<2 x i8> %x) {
   ret <2 x i16> %c
 }
 
-; TODO: We could convert both uses of %a to ashr.
+; TODO: We could convert %a to ashr and eliminate 2nd use of %b.
 
 define i16 @t6_extrause0(i8 %x) {
 ; CHECK-LABEL: @t6_extrause0(
@@ -101,7 +103,7 @@ define i16 @t6_extrause0(i8 %x) {
   ret i16 %c
 }
 
-; TODO: We could convert both uses of %a to ashr.
+; TODO: We could convert %a to ashr and eliminate 2nd use of %b.
 
 define <2 x i16> @t7_extrause0_vec_undef(<2 x i8> %x) {
 ; CHECK-LABEL: @t7_extrause0_vec_undef(
@@ -118,7 +120,7 @@ define <2 x i16> @t7_extrause0_vec_undef(<2 x i8> %x) {
   ret <2 x i16> %c
 }
 
-; TODO: We could convert both uses of %a to ashr.
+; TODO: We could convert %a to ashr + mask (and) and eliminate %b.
 
 define i16 @t8_extrause1(i8 %x) {
 ; CHECK-LABEL: @t8_extrause1(
@@ -135,7 +137,7 @@ define i16 @t8_extrause1(i8 %x) {
   ret i16 %c
 }
 
-; TODO: We could convert both uses of %a to ashr.
+; TODO: We could convert %a to ashr + mask (and) and eliminate %b.
 
 define <2 x i16> @t9_extrause1_vec_undef(<2 x i8> %x) {
 ; CHECK-LABEL: @t9_extrause1_vec_undef(


        


More information about the llvm-commits mailing list