mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
8b679a00b6
Summary: LDRdPtr expanded from LDWRdPtr shouldn't define its second operand(SrcReg). The second operand is its source register. Add -verify-machineinstrs into command line of testcases can trigger this error. Reviewers: dylanmckay Reviewed By: dylanmckay Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75437
19 lines
579 B
LLVM
19 lines
579 B
LLVM
; RUN: llc -mattr=sram,eijmpcall < %s -march=avr -verify-machineinstrs | FileCheck %s
|
|
|
|
@brind.k = private unnamed_addr constant [2 x i8*] [i8* blockaddress(@brind, %return), i8* blockaddress(@brind, %b)], align 1
|
|
|
|
define i8 @brind(i8 %p) {
|
|
; CHECK-LABEL: brind:
|
|
; CHECK: ijmp
|
|
entry:
|
|
%idxprom = sext i8 %p to i16
|
|
%arrayidx = getelementptr inbounds [2 x i8*], [2 x i8*]* @brind.k, i16 0, i16 %idxprom
|
|
%s = load i8*, i8** %arrayidx
|
|
indirectbr i8* %s, [label %return, label %b]
|
|
b:
|
|
br label %return
|
|
return:
|
|
%retval.0 = phi i8 [ 4, %b ], [ 2, %entry ]
|
|
ret i8 %retval.0
|
|
}
|