[llvm] [CodeGen] Fix InstructionCount remarks for MI bundles (PR #107621)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 20:54:22 PDT 2024
================
@@ -0,0 +1,35 @@
+# RUN: llc -mtriple=riscv32 -verify-machineinstrs -start-before=riscv-expand-pseudo -simplify-mir -o /dev/null -pass-remarks-analysis=asm-printer %s 2>&1 | FileCheck %s
+---
+name: instrs
+tracksRegLiveness: true
+body: |
+ bb.0:
+ $x0 = ADDI $x0, 0
+ $x0 = ADDI $x0, 0
+ $x0 = ADDI $x0, 0
+ $x0 = LW $x0, 0
+ $x0 = LW $x0, 0
+ $x0 = XORI $x0, 0
+ ; CHECK: addi : 3
+ ; CHECK-NEXT: lw : 2
+ ; CHECK-NEXT: xori : 1
+ ; CHECK: 6 instructions in function
+...
+---
+name: bundles
+tracksRegLiveness: true
+body: |
+ bb.0:
+ $x0 = ADDI $x0, 0
+ BUNDLE {
+ $x0 = ADDI $x0, 0
+ $x0 = ADDI $x0, 0
+ $x0 = LW $x0, 0
+ }
+ $x0 = LW $x0, 0
+ $x0 = XORI $x0, 0
+ ; CHECK: addi : 3
+ ; CHECK-NEXT: lw : 2
+ ; CHECK-NEXT: xori : 1
+ ; CHECK: 6 instructions in function
+...
----------------
arsenm wrote:
Add some cases with skipped meta instructions
https://github.com/llvm/llvm-project/pull/107621
More information about the llvm-commits
mailing list