1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/test/CodeGen/Hexagon/storerd-io-over-rr.ll
Krzysztof Parzyszek 37ebf5f0df [Hexagon] Prefer _io over _rr for 64-bit store with constant offset
Identify patterns where the address is aligned to an 8-byte boundary,
but both the base address and the constant offset are both proper
multiples of 4. In such cases, extract Base+4 into a separate instruc-
tion, and use S2_storerd_io, instead of using S4_storerd_rr.

llvm-svn: 277497
2016-08-02 18:50:05 +00:00

13 lines
330 B
LLVM

; RUN: llc -march=hexagon < %s | FileCheck %s
; Check for memd(base + #offset), instead of memd(base + reg<<#c).
; CHECK: memd(r{{[0-9]+}}+#
define void @fred(i32 %p, i64 %v) #0 {
%t0 = add i32 %p, 4
%t1 = inttoptr i32 %t0 to i64*
store i64 %v, i64* %t1
ret void
}
attributes #0 = { nounwind "target-cpu"="hexagonv60" }