[llvm] 41492d7 - [LoopVectorize][X86] Add operands to make it more obvious what line the CHECK concerns

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 22 02:26:24 PDT 2021


Author: Simon Pilgrim
Date: 2021-09-22T10:08:32+01:00
New Revision: 41492d77ba65338b9eb2b7f401e47acf22e4ea19

URL: https://github.com/llvm/llvm-project/commit/41492d77ba65338b9eb2b7f401e47acf22e4ea19
DIFF: https://github.com/llvm/llvm-project/commit/41492d77ba65338b9eb2b7f401e47acf22e4ea19.diff

LOG: [LoopVectorize][X86] Add operands to make it more obvious what line the CHECK concerns

As we're checking the cost debug analysis these should match the original IR line - so we shouldn't have any variable naming issues.

I'm investigating v4i32 mul -> PMADDDW costs handling (for PR47437) and these CHECK lines were proving tricky to keep track of

Added: 
    

Modified: 
    llvm/test/Transforms/LoopVectorize/X86/mul_slm_16bit.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/LoopVectorize/X86/mul_slm_16bit.ll b/llvm/test/Transforms/LoopVectorize/X86/mul_slm_16bit.ll
index 2702e0f39dab6..167b2411cf46b 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/mul_slm_16bit.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/mul_slm_16bit.ll
@@ -32,38 +32,38 @@ for.body:                                         ; preds = %for.body.preheader,
   %conv3 = sext i8 %1 to i32
 ; sources of the mul is sext\sext from i8 
 ; use pmullw\sext seq.   
-; SLM:  cost of 3 for VF 4 {{.*}} mul nsw i32  
+; SLM:  cost of 3 for VF 4 {{.*}} mul nsw i32 %conv3, %conv
   %mul = mul nsw i32 %conv3, %conv
 ; sources of the mul is zext\sext from i8
 ; use pmulhw\pmullw\pshuf
-; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32 %conv4, %conv
   %conv4 = zext i8 %1 to i32
   %mul2 = mul nsw i32 %conv4, %conv
   %sum0 = add i32 %mul, %mul2
 ; sources of the mul is zext\zext from i8
 ; use pmullw\zext
-; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32 %conv5, %conv4
   %conv5 = zext i8 %0 to i32
   %mul3 = mul nsw i32 %conv5, %conv4
   %sum1 = add i32 %sum0, %mul3
 ; sources of the mul is sext\-120
 ; use pmullw\sext
-; SLM:  cost of 3 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 3 for VF 4 {{.*}} mul nsw i32 -120, %conv3
   %mul4 = mul nsw i32 -120, %conv3
   %sum2 = add i32 %sum1, %mul4
 ; sources of the mul is sext\250
 ; use pmulhw\pmullw\pshuf
-; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32 250, %conv3
   %mul5 = mul nsw i32 250, %conv3
   %sum3 = add i32 %sum2, %mul5
 ; sources of the mul is zext\-120
 ; use pmulhw\pmullw\pshuf
-; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32 -120, %conv4
   %mul6 = mul nsw i32 -120, %conv4
   %sum4 = add i32 %sum3, %mul6
 ; sources of the mul is zext\250
 ; use pmullw\zext
-; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 2 for VF 4 {{.*}} mul nsw i32 250, %conv4
   %mul7 = mul nsw i32 250, %conv4
   %sum5 = add i32 %sum4, %mul7
   %add = add i32 %acc.013, 5
@@ -101,38 +101,38 @@ for.body:                                         ; preds = %for.body.preheader,
   %conv3 = sext i16 %1 to i32
 ; sources of the mul is sext\sext from i16 
 ; use pmulhw\pmullw\pshuf seq.   
-; SLM:  cost of 5 for VF 4 {{.*}} mul nsw i32  
+; SLM:  cost of 5 for VF 4 {{.*}} mul nsw i32 %conv3, %conv
   %mul = mul nsw i32 %conv3, %conv
 ; sources of the mul is zext\sext from i16
 ; use pmulld
-; SLM:  cost of 11 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 11 for VF 4 {{.*}} mul nsw i32 %conv4, %conv
   %conv4 = zext i16 %1 to i32
   %mul2 = mul nsw i32 %conv4, %conv
   %sum0 = add i32 %mul, %mul2
 ; sources of the mul is zext\zext from i16
 ; use pmulhw\pmullw\zext
-; SLM:  cost of 5 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 5 for VF 4 {{.*}} mul nsw i32 %conv5, %conv4
   %conv5 = zext i16 %0 to i32
   %mul3 = mul nsw i32 %conv5, %conv4
   %sum1 = add i32 %sum0, %mul3
 ; sources of the mul is sext\-32000
 ; use pmulhw\pmullw\sext
-; SLM:  cost of 5 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 5 for VF 4 {{.*}} mul nsw i32 -32000, %conv3
   %mul4 = mul nsw i32 -32000, %conv3
   %sum2 = add i32 %sum1, %mul4
 ; sources of the mul is sext\64000
 ; use pmulld
-; SLM:  cost of 11 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 11 for VF 4 {{.*}} mul nsw i32 64000, %conv3
   %mul5 = mul nsw i32 64000, %conv3
   %sum3 = add i32 %sum2, %mul5
 ; sources of the mul is zext\-32000
 ; use pmulld
-; SLM:  cost of 11 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 11 for VF 4 {{.*}} mul nsw i32 -32000, %conv4
   %mul6 = mul nsw i32 -32000, %conv4
   %sum4 = add i32 %sum3, %mul6
 ; sources of the mul is zext\64000
 ; use pmulhw\pmullw\zext
-; SLM:  cost of 5 for VF 4 {{.*}} mul nsw i32
+; SLM:  cost of 5 for VF 4 {{.*}} mul nsw i32 250, %conv4
   %mul7 = mul nsw i32 250, %conv4
   %sum5 = add i32 %sum4, %mul7
   %add = add i32 %acc.013, 5


        


More information about the llvm-commits mailing list