-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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 multi-insn emission
The importer will now accept nested instructions in the result pattern such as (ADDWrr $a, (SUBWrr $b, $c)). This is only valid when the nested instruction def's a single vreg and the parent instruction consumes a single vreg where a nested instruction is specified. The importer will automatically create a vreg to connect the two using the type information from the pattern. This vreg will be constrained to the register classes given in the instruction definitions*. * REG_SEQUENCE is explicitly rejected because of this. The definition doesn't constrain to a register class and it therefore needs special handling. llvm-svn: 317117
- Loading branch information
1 parent
7b861f0
commit 9cbe7c7
Showing
6 changed files
with
238 additions
and
30 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
19 changes: 19 additions & 0 deletions
19
llvm/test/CodeGen/AArch64/GlobalISel/select-bitcast-bigendian.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,19 @@ | ||
# RUN: llc -O0 -mtriple=arm64eb-- -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s | ||
--- | ||
name: bitcast_v2f32_to_s64 | ||
legalized: true | ||
regBankSelected: true | ||
|
||
body: | | ||
bb.0: | ||
liveins: %x0 | ||
; CHECK-LABEL: name: bitcast_v2f32_to_s64 | ||
; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY %x0 | ||
; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY [[COPY]] | ||
; CHECK: [[REV:%[0-9]+]]:fpr64 = REV64v2i32 [[COPY1]] | ||
; CHECK: %x0 = COPY [[REV]] | ||
%0:fpr(<2 x s32>) = COPY %x0 | ||
%1:fpr(s64) = G_BITCAST %0 | ||
%x0 = COPY %1(s64) | ||
... |
26 changes: 26 additions & 0 deletions
26
llvm/test/CodeGen/AArch64/GlobalISel/select-intrinsic-crypto-aesmc.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,26 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py | ||
# RUN: llc -mtriple=aarch64-- -mattr=+fuse-aes -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s | ||
|
||
--- | ||
# Check that we select the aarch64_crypto_aesmc and aarch64_crypto_aese | ||
# intrinsics into an ARSMCrrTied and AESErr instruction sequence. | ||
name: aesmc_aese | ||
legalized: true | ||
regBankSelected: true | ||
|
||
body: | | ||
bb.0: | ||
liveins: %q0, %q1 | ||
; CHECK-LABEL: name: aesmc_aese | ||
; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY %q0 | ||
; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY %q1 | ||
; CHECK: [[T0:%[0-9]+]]:fpr128 = AESErr [[COPY]], [[COPY1]] | ||
; CHECK: [[T1:%[0-9]+]]:fpr128 = AESMCrrTied [[T0]] | ||
; CHECK: %q0 = COPY [[T1]] | ||
%0:fpr(<16 x s8>) = COPY %q0 | ||
%1:fpr(<16 x s8>) = COPY %q1 | ||
%2:fpr(<16 x s8>) = G_INTRINSIC intrinsic(@llvm.aarch64.crypto.aese), %0, %1 | ||
%3:fpr(<16 x s8>) = G_INTRINSIC intrinsic(@llvm.aarch64.crypto.aesmc), %2 | ||
%q0 = COPY %3(<16 x s8>) | ||
... |
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.