[llvm] [AMDGPU][NFC] Add tests in preparation for i8 vectorization (PR #138801)
    Jeffrey Byrnes via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed May  7 11:02:05 PDT 2025
    
    
  
================
@@ -0,0 +1,356 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx90a < %s | FileCheck %s --check-prefixes=GFX90A
+
+
+define void @loads_i1(i32 %arg) {
+; GFX90A-LABEL: 'loads_i1'
+; GFX90A-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load i1, ptr poison, align 1
+; GFX90A-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = load <2 x i1>, ptr poison, align 1
+; GFX90A-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %3 = load <4 x i1>, ptr poison, align 1
+; GFX90A-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+  load i1, ptr poison
+  load <2 x i1>, ptr poison
+  load <4 x i1>, ptr poison
----------------
jrbyrnes wrote:
Add 3 element coverage to the loads_i* tests
https://github.com/llvm/llvm-project/pull/138801
    
    
More information about the llvm-commits
mailing list