mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
631e350306
The VLLDM and VLSTM instructions are incompletely specified. They (potentially) write (or read, respectively) registers Q0-Q7, VPR, and FPSCR, but the compiler is unaware of it. In the new test case `cmse-vlldm-no-reorder.ll` case the compiler missed an anti-dependency and reordered a `VLLDM` ahead of the instruction, which stashed the return value from the non-secure call, effectively clobbering said value. This test case does not fail with upstream LLVM, because of scheduling differences and I couldn't find a test case for the VLSTM either. Differential Revision: https://reviews.llvm.org/D81586
22 lines
661 B
LLVM
22 lines
661 B
LLVM
; RUN: llc -mtriple=thumbv8m.main -mcpu=cortex-m33 --float-abi=hard %s -o - | \
|
|
; RUN: FileCheck %s
|
|
|
|
@g = hidden local_unnamed_addr global float (...)* null, align 4
|
|
@a = hidden local_unnamed_addr global float 0.000000e+00, align 4
|
|
|
|
define hidden void @f() local_unnamed_addr #0 {
|
|
entry:
|
|
%0 = load float ()*, float ()** bitcast (float (...)** @g to float ()**), align 4
|
|
%call = tail call nnan ninf nsz float %0() #1
|
|
store float %call, float* @a, align 4
|
|
ret void
|
|
}
|
|
|
|
; CHECK: blxns r{{[0-9]+}}
|
|
; CHECK: vmov r[[T:[0-9]+]], s0
|
|
; CHECK: vlldm sp
|
|
; CHECK: vmov s0, r[[T]]
|
|
|
|
attributes #0 = { nounwind }
|
|
attributes #1 = { nounwind "cmse_nonsecure_call" }
|