2019-05-15 20:41:58 +08:00
|
|
|
# RUN: llc %s -run-pass machine-scheduler -o - | FileCheck %s
|
|
|
|
|
|
|
|
# CHECK-LABEL: bb.0.
|
|
|
|
# CHECK: t2LDRi12
|
|
|
|
# CHECK-NEXT: t2LDRi12
|
|
|
|
# CHECK-NEXT: t2ADDri
|
|
|
|
# CHECK-NEXT: t2ADDri
|
|
|
|
--- |
|
|
|
|
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
|
|
|
target triple = "thumbv7em-arm-none-eabi"
|
|
|
|
|
|
|
|
; Function Attrs: norecurse nounwind optsize readonly
|
|
|
|
define dso_local i32 @test(i32* nocapture readonly %a, i32* nocapture readonly %b) local_unnamed_addr #0 {
|
|
|
|
entry:
|
|
|
|
%0 = load i32, i32* %a, align 4
|
|
|
|
%add = add nsw i32 %0, 10
|
|
|
|
%1 = load i32, i32* %b, align 4
|
|
|
|
%add1 = add nsw i32 %1, 20
|
|
|
|
%mul = mul nsw i32 %add1, %add
|
|
|
|
ret i32 %mul
|
|
|
|
}
|
|
|
|
|
|
|
|
attributes #0 = { "target-cpu"="cortex-m4" }
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 2
|
2019-05-15 20:41:58 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
failedISel: false
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: gpr, preferred-register: '' }
|
|
|
|
- { id: 1, class: gpr, preferred-register: '' }
|
|
|
|
- { id: 2, class: gprnopc, preferred-register: '' }
|
|
|
|
- { id: 3, class: rgpr, preferred-register: '' }
|
|
|
|
- { id: 4, class: gprnopc, preferred-register: '' }
|
|
|
|
- { id: 5, class: rgpr, preferred-register: '' }
|
|
|
|
- { id: 6, class: rgpr, preferred-register: '' }
|
|
|
|
liveins:
|
|
|
|
- { reg: '$r0', virtual-reg: '%0' }
|
|
|
|
- { reg: '$r1', virtual-reg: '%1' }
|
|
|
|
body: |
|
|
|
|
bb.0.entry:
|
|
|
|
liveins: $r0, $r1
|
|
|
|
|
|
|
|
%1:gpr = COPY $r1
|
|
|
|
%0:gpr = COPY $r0
|
|
|
|
%2:gprnopc = t2LDRi12 %0, 0, 14, $noreg :: (load 4 from %ir.a)
|
|
|
|
%3:rgpr = nsw t2ADDri %2, 10, 14, $noreg, $noreg
|
|
|
|
%4:gprnopc = t2LDRi12 %1, 0, 14, $noreg :: (load 4 from %ir.b)
|
|
|
|
%5:rgpr = nsw t2ADDri %4, 20, 14, $noreg, $noreg
|
|
|
|
%6:rgpr = nsw t2MUL %5, %3, 14, $noreg
|
|
|
|
$r0 = COPY %6
|
|
|
|
tBX_RET 14, $noreg, implicit $r0
|
|
|
|
|
|
|
|
...
|