Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPWBS-1388] Add legality rules for G_INTRINSIC_TRUNC
- Loading branch information
1 parent
290d0bf
commit f97d2c6
Showing
3 changed files
with
81 additions
and
0 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
41 changes: 41 additions & 0 deletions
41
llvm/test/CodeGen/TriCore/GlobalIsel/legalize-intrinsic-trunc.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,41 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py | ||
# RUN: llc -O0 -mtriple=tricore -global-isel -run-pass=legalizer \ | ||
# RUN: -verify-machineinstrs %s -o - | FileCheck %s | ||
|
||
--- | ||
name: intrinsic_trunc_s32 | ||
body: | | ||
bb.0: | ||
liveins: $d4 | ||
; CHECK-LABEL: name: intrinsic_trunc_s32 | ||
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $d4 | ||
; CHECK: ADJCALLSTACKDOWN 0, 0, implicit-def $a10, implicit $a10 | ||
; CHECK: $d4 = COPY [[COPY]](s32) | ||
; CHECK: CALL &truncf, csr_tricore_uppercontext, implicit-def $a11, implicit $psw, implicit $d4, implicit-def $d2 | ||
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $d2 | ||
; CHECK: ADJCALLSTACKUP 0, 0, implicit-def $a10, implicit $a10 | ||
; CHECK: $d4 = COPY [[COPY1]](s32) | ||
%0:_(s32) = COPY $d4 | ||
%1:_(s32) = G_INTRINSIC_TRUNC %0(s32) | ||
$d4 = COPY %1(s32) | ||
... | ||
|
||
--- | ||
name: intrinsic_trunc_s64 | ||
body: | | ||
bb.0: | ||
liveins: $d4 | ||
; CHECK-LABEL: name: intrinsic_trunc_s64 | ||
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $e4 | ||
; CHECK: ADJCALLSTACKDOWN 0, 0, implicit-def $a10, implicit $a10 | ||
; CHECK: $e4 = COPY [[COPY]](s64) | ||
; CHECK: CALL &trunc, csr_tricore_uppercontext, implicit-def $a11, implicit $psw, implicit $e4, implicit-def $e2 | ||
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $e2 | ||
; CHECK: ADJCALLSTACKUP 0, 0, implicit-def $a10, implicit $a10 | ||
; CHECK: $e4 = COPY [[COPY1]](s64) | ||
%0:_(s64) = COPY $e4 | ||
%1:_(s64) = G_INTRINSIC_TRUNC %0(s64) | ||
$e4 = COPY %1(s64) | ||
... |