summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Hexagon/addaddi.ll
blob: 6510858f1bd85c815c56a5fd5fc844b463c7be16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; 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 }
OpenPOWER on IntegriCloud