1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/CodeGen/Hexagon/addaddi.ll
Krzysztof Parzyszek d67f165bc2 [Hexagon] Add extra pattern for S4_addaddi
One combination was missing: add(add(x,y),c).

llvm-svn: 316363
2017-10-23 19:07:50 +00:00

14 lines
334 B
LLVM

; RUN: llc -march=hexagon < %s | FileCheck %s
; Check for S4_addaddi:
; CHECK: r{{[0-9]+}} = add(r{{[0-9]+}},add(r{{[0-9]+}},#2))
define i32 @fred(i32 %a0, i32 %a1, i32* nocapture %a2) #0 {
b3:
%v4 = add nsw i32 %a0, 2
%v5 = add nsw i32 %v4, %a1
store i32 %v5, i32* %a2, align 4
ret i32 undef
}
attributes #0 = { nounwind }