summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-11-22 20:55:41 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-11-22 20:55:41 +0000
commitb9f33b32eeaccdf398910013d6916df2caf1c9db (patch)
tree8a8efbdb7f526036bc7add7031ec88d9be09552d /llvm/lib/Target/Hexagon
parent6acecc96ac0d68147f6e59304b5f2d2c31ac1132 (diff)
downloadbcm5719-llvm-b9f33b32eeaccdf398910013d6916df2caf1c9db.tar.gz
bcm5719-llvm-b9f33b32eeaccdf398910013d6916df2caf1c9db.zip
[Hexagon] Add patterns to select A2_combine_ll and its variants
llvm-svn: 318876
Diffstat (limited to 'llvm/lib/Target/Hexagon')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonPatterns.td10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonPatterns.td b/llvm/lib/Target/Hexagon/HexagonPatterns.td
index 05865c43f2d..00ce6916fbd 100644
--- a/llvm/lib/Target/Hexagon/HexagonPatterns.td
+++ b/llvm/lib/Target/Hexagon/HexagonPatterns.td
@@ -1130,6 +1130,16 @@ def: Pat<(or (or (shl (or (shl (i32 (extloadi8 (add I32:$b, 3))),
(zextloadi8 I32:$b)),
(A2_swiz (L2_loadri_io IntRegs:$b, 0))>;
+let AddedComplexity = 200 in {
+ def: Pat<(or (shl I32:$Rt, (i32 16)), (and I32:$Rs, (i32 65535))),
+ (A2_combine_ll I32:$Rt, I32:$Rs)>;
+ def: Pat<(or (shl I32:$Rt, (i32 16)), (srl I32:$Rs, (i32 16))),
+ (A2_combine_lh I32:$Rt, I32:$Rs)>;
+ def: Pat<(or (and I32:$Rt, (i32 268431360)), (and I32:$Rs, (i32 65535))),
+ (A2_combine_hl I32:$Rt, I32:$Rs)>;
+ def: Pat<(or (and I32:$Rt, (i32 268431360)), (srl I32:$Rs, (i32 16))),
+ (A2_combine_hh I32:$Rt, I32:$Rs)>;
+}
def SDTHexagonVShift
: SDTypeProfile<1, 2, [SDTCisSameAs<0, 1>, SDTCisVec<0>, SDTCisVT<2, i32>]>;
OpenPOWER on IntegriCloud