forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[globalisel][tablegen] Add support for ImmLeaf without SDNodeXForm
Summary: This patch adds support for predicates on imm nodes but only for ImmLeaf and not for PatLeaf or PatFrag and only where the value does not need to be transformed before being rendered into the instruction. The limitation on PatLeaf/PatFrag/SDNodeXForm is due to differences in the necessary target-supplied C++ for GlobalISel. Depends on D36085 Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: kristof.beyls, javed.absar, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36086 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311546 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
6c41152
commit 6310201
Showing
5 changed files
with
234 additions
and
19 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
37 changes: 37 additions & 0 deletions
37
test/CodeGen/AArch64/GlobalISel/select-neon-vcvtfxu2fp.mir
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,37 @@ | ||
# RUN: llc -mtriple=aarch64-- -mattr=+neon,+fullfp16 -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s | ||
|
||
--- | | ||
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" | ||
|
||
define void @vcvtfxu2fp_s64_fpr() { ret void } | ||
... | ||
|
||
--- | ||
# Check that we select a 64-bit FPR vcvtfxu2fp intrinsic into UCVTFd for FPR64. | ||
# CHECK-LABEL: name: vcvtfxu2fp_s64_fpr | ||
name: vcvtfxu2fp_s64_fpr | ||
legalized: true | ||
regBankSelected: true | ||
|
||
# CHECK: registers: | ||
# CHECK-NEXT: - { id: 0, class: fpr64, preferred-register: '' } | ||
# CHECK-NEXT: - { id: 1, class: gpr, preferred-register: '' } | ||
# CHECK-NEXT: - { id: 2, class: fpr64, preferred-register: '' } | ||
registers: | ||
- { id: 0, class: fpr } | ||
- { id: 1, class: gpr } | ||
- { id: 2, class: fpr } | ||
|
||
# CHECK: body: | ||
# CHECK: %0 = COPY %d0 | ||
# CHECK: %2 = UCVTFd %0, 12 | ||
# CHECK: %d1 = COPY %2 | ||
body: | | ||
bb.0: | ||
liveins: %d0 | ||
%0(s64) = COPY %d0 | ||
%1(s32) = G_CONSTANT i32 12 | ||
%2(s64) = G_INTRINSIC intrinsic(@llvm.aarch64.neon.vcvtfxu2fp.f64), %0, %1 | ||
%d1 = COPY %2(s64) | ||
... |
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
Oops, something went wrong.