27 lines · plain
1; RUN: llc -mtriple=hexagon -filetype=obj < %s | llvm-objdump -d - | FileCheck %s2 3; The output assembly (textual) contains the instruction4; r29 = add(r29,#4294967136)5; The value 4294967136 is -160 when interpreted as a signed 32-bit6; integer, so it fits in the range of the immediate operand without7; a constant extender. The range check in HexagonInstrInfo was putting8; the operand value into an int variable, reporting no need for an9; extender. This resulted in a packet with 4 instructions, including10; the "add". The corresponding check in HexagonMCInstrInfo was using11; an int64_t variable, causing an extender to be emitted when lowering12; to MCInst, and resulting in a packet with 5 instructions.13 14; Check that this doesn't crash.15; CHECK: r29 = add(r29,#-0xa0)16 17target triple = "hexagon-unknown-linux-gnu"18 19define float @f0() {20b0:21 %v0 = alloca i8, i32 0, align 122 %v1 = alloca float, i32 -42, align 423 %v2 = load float, ptr %v1, align 424 store i8 0, ptr %v0, align 125 ret float %v226}27