diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-10-23 19:07:50 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-10-23 19:07:50 +0000 |
commit | 0344b6624ee040ef603f90bf463367309257335f (patch) | |
tree | bbb79d825b7aec1a7bef72048c57aa0dd0d3573c /test/CodeGen/Hexagon | |
parent | 2c4e91e1aae7f15101d25bfb9338b29765ffb45a (diff) |
[Hexagon] Add extra pattern for S4_addaddi
One combination was missing: add(add(x,y),c).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Hexagon')
-rw-r--r-- | test/CodeGen/Hexagon/addaddi.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/addaddi.ll b/test/CodeGen/Hexagon/addaddi.ll new file mode 100644 index 00000000000..6510858f1bd --- /dev/null +++ b/test/CodeGen/Hexagon/addaddi.ll @@ -0,0 +1,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 } |