Files
clang-p2996/llvm/test/CodeGen/Thumb2/avoidmuls.mir
VladiKrapp-Arm ea796e5237 [ARM] Prefer MUL to MULS on some implementations (#112540)
MULS adversely affects performance on many implementations. Where this
is the case, we prefer not to shrink MUL to MULS.
2024-10-17 13:53:22 +01:00

20 lines
523 B
YAML

# RUN: llc -mtriple=thumbv7m-none-eabi -mcpu=cortex-m33 -run-pass=thumb2-reduce-size %s -o - | FileCheck %s --check-prefix=MUL
# RUN: llc -mtriple=thumbv7m-none-eabi --run-pass=thumb2-reduce-size %s -o - | FileCheck %s --check-prefix=MULS
---
name: test
body: |
bb.0:
$r2 = tMOVr $r0, 14, _
$r0 = t2MOVi 1, 14, _, _
$r0 = t2MUL $r2, killed $r0, 14, _
tBX_RET 14, _, implicit $r0
...
# MUL-LABEL: test
# MUL: t2MUL
# MUL-NOT: tMUL
# MULS-LABEL: test
# MULS: tMUL
# MULS-NOT: t2MUL