2017-03-02 06:56:20 +08:00
|
|
|
# RUN: llc -run-pass arm-ldst-opt -verify-machineinstrs %s -o - | FileCheck %s
|
|
|
|
# ARM load store optimizer was dealing with a sequence like:
|
2017-12-07 18:40:31 +08:00
|
|
|
# s1 = VLDRS [r0, 1], implicit-def Q0
|
|
|
|
# s3 = VLDRS [r0, 2], implicit killed Q0, implicit-def Q0
|
|
|
|
# s0 = VLDRS [r0, 0], implicit killed Q0, implicit-def Q0
|
|
|
|
# s2 = VLDRS [r0, 4], implicit killed Q0, implicit-def Q0
|
2017-03-02 06:56:20 +08:00
|
|
|
#
|
|
|
|
# It decided to combine the {s0, s1} loads into a single instruction in the
|
|
|
|
# third position. However, this leaves the instruction defining s3 with a stray
|
|
|
|
# imp-use of Q0, which is undefined.
|
|
|
|
#
|
|
|
|
# The verifier catches this, so this test just makes sure that appropriate
|
|
|
|
# liveness flags are added.
|
|
|
|
--- |
|
|
|
|
target triple = "thumbv7-apple-ios"
|
|
|
|
define arm_aapcs_vfpcc <4 x float> @foo(float* %ptr) {
|
|
|
|
ret <4 x float> undef
|
|
|
|
}
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: foo
|
[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
|
2017-03-02 06:56:20 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$r0' }
|
2017-03-02 06:56:20 +08:00
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $r0
|
2017-03-02 06:56:20 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$s1 = VLDRS $r0, 1, 14, $noreg, implicit-def $q0 :: (load 4)
|
|
|
|
$s3 = VLDRS $r0, 2, 14, $noreg, implicit killed $q0, implicit-def $q0 :: (load 4)
|
|
|
|
; CHECK: $s3 = VLDRS $r0, 2, 14, $noreg, implicit killed undef $q0, implicit-def $q0 :: (load 4)
|
2017-03-02 06:56:20 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$s0 = VLDRS $r0, 0, 14, $noreg, implicit killed $q0, implicit-def $q0 :: (load 4)
|
|
|
|
; CHECK: VLDMSIA $r0, 14, $noreg, def $s0, def $s1, implicit-def $noreg
|
2017-03-02 06:56:20 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$s2 = VLDRS killed $r0, 4, 14, $noreg, implicit killed $q0, implicit-def $q0 :: (load 4)
|
|
|
|
; CHECK: $s2 = VLDRS killed $r0, 4, 14, $noreg, implicit killed $q0, implicit-def $q0 :: (load 4)
|
2017-03-02 06:56:20 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
tBX_RET 14, $noreg, implicit $q0
|
2017-03-02 06:56:20 +08:00
|
|
|
...
|