Files
clang-p2996/llvm/test/CodeGen/Hexagon/addrmode-opt-assert.mir
Pranav Bhandarkar bde1032588 [Hexagon] Fix optimize address mode pass only handle BaseImmOffset mode
This is a fix for a crash in the HexagonOptAddrMode pass that was looking
for the third operand (offset) in the following instruction that does not,
in fact, have a third operand:

  $r1 = L2_loadw_locked $r1

Additionally, this patch also adds an addrMode value to vgather pseudos
in the Hexagon backend.

Differential Revision: https://reviews.llvm.org/D117133
2022-01-14 15:45:23 -08:00

25 lines
732 B
YAML

# RUN: llc -march=hexagon -mcpu=hexagonv62 -run-pass amode-opt %s -o -
# REQUIRES: asserts
#
# This test merely checks if the pass that optimizes addressing modes in the
# hexagon backend doesn't crash when the following code is presented to it.
#
# This is a testcase reduced from code generated by the Halide compiler for a
# Halide pipeline. This code was causing the pass 'amode-opt' to crash because
# it was looking for the third operand (offset) in the following instruction
# that does not, in fact, have a third operand.
#
# $r1 = L2_loadw_locked $r1
#
# Check that this doesn't crash.
name: fred
tracksRegLiveness: true
body: |
bb.0:
liveins: $r0
$r1 = A2_addi $r0, 4
$r1 = L2_loadw_locked $r1
...