mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
8c4e64af8a
If it's safe to clobber the condition flags, we can do a few extra things: it's then possible to reset the base register writeback using a SUBS, so we can try to merge even if the base register isn't dead after the merged instruction. This is effectively a (heavily bug-fixed) rewrite of r208992. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218386 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
432 B
LLVM
18 lines
432 B
LLVM
; RUN: llc < %s -mtriple=thumbv6m-eabi -verify-machineinstrs -o - | FileCheck %s
|
|
|
|
define void @foo(i32* %A) #0 {
|
|
entry:
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: push {r7, lr}
|
|
; CHECK: ldm
|
|
; CHECK-NEXT: subs
|
|
; CHECK-NEXT: bl
|
|
%0 = load i32* %A, align 4
|
|
%arrayidx1 = getelementptr inbounds i32* %A, i32 1
|
|
%1 = load i32* %arrayidx1, align 4
|
|
tail call void @bar(i32* %A, i32 %0, i32 %1) #2
|
|
ret void
|
|
}
|
|
|
|
declare void @bar(i32*, i32, i32) #1
|