1 ; RUN: llc -march=hexagon -filetype=obj < %s | llvm-objdump -d - | FileCheck %s
3 ; The output assembly (textual) contains the instruction
4 ; r29 = add(r29,#4294967136)
5 ; The value 4294967136 is -160 when interpreted as a signed 32-bit
6 ; integer, so it fits in the range of the immediate operand without
7 ; a constant extender. The range check in HexagonInstrInfo was putting
8 ; the operand value into an int variable, reporting no need for an
9 ; extender. This resulted in a packet with 4 instructions, including
10 ; the "add". The corresponding check in HexagonMCInstrInfo was using
11 ; an int64_t variable, causing an extender to be emitted when lowering
12 ; to MCInst, and resulting in a packet with 5 instructions.
14 ; Check that this doesn't crash.
15 ; CHECK: r29 = add(r29,#-0xa0)
17 target triple = "hexagon-unknown-linux-gnu"
21 %v0 = alloca i8, i32 0, align 1
22 %v1 = alloca float, i32 -42, align 4
23 %v2 = load float, ptr %v1, align 4
24 store i8 0, ptr %v0, align 1