-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SVE] Add patterns for MUL immediate instruction.
Summary: Add the missing MUL pattern for integer immediate instructions. Reviewers: sdesmalen, huntergr, efriedma, c-rhodes, kmclaughlin Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits, amehsan Tags: #llvm Differential Revision: https://reviews.llvm.org/D72654
- Loading branch information
Danilo Carvalho Grael
committed
Jan 14, 2020
1 parent
5d1b3ba
commit 26d9612
Showing
5 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
; RUN: not llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | ||
|
||
; Numbers smaller than -127 and greater than or equal to 127 are not allowed. | ||
; This should get lowered to a regular vector multiply and these tests should | ||
; be updated when those patterns are added. | ||
|
||
define <vscale x 2 x i64> @mul_i64_neg_1(<vscale x 2 x i64> %a) { | ||
%elt = insertelement <vscale x 2 x i64> undef, i64 255, i32 0 | ||
%splat = shufflevector <vscale x 2 x i64> %elt, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer | ||
%res = mul <vscale x 2 x i64> %a, %splat | ||
ret <vscale x 2 x i64> %res | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
; RUN: not llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | ||
|
||
; Numbers smaller than -127 and greater than or equal to 127 allowed for imm mul. | ||
; This should get lowered to a regular vector multiply and these tests should | ||
; be updated when those patterns are added. | ||
define <vscale x 2 x i64> @mul_i64_neg_1(<vscale x 2 x i64> %a) { | ||
%elt = insertelement <vscale x 2 x i64> undef, i64 -130, i32 0 | ||
%splat = shufflevector <vscale x 2 x i64> %elt, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer | ||
%res = mul <vscale x 2 x i64> %a, %splat | ||
ret <vscale x 2 x i64> %res | ||
} |