diff options
| author | Amara Emerson <aemerson@apple.com> | 2019-07-19 00:24:45 +0000 |
|---|---|---|
| committer | Amara Emerson <aemerson@apple.com> | 2019-07-19 00:24:45 +0000 |
| commit | cf12c7815fed11f789076bd0cd647fe1dfd78b45 (patch) | |
| tree | 592335c31e831aef072eec2f7f3759fea9e2ad9d /llvm/test/CodeGen/Mips/GlobalISel | |
| parent | 3d9955c869f441062617dfe5da83e66749822a25 (diff) | |
| download | bcm5719-llvm-cf12c7815fed11f789076bd0cd647fe1dfd78b45.tar.gz bcm5719-llvm-cf12c7815fed11f789076bd0cd647fe1dfd78b45.zip | |
[GlobalISel] Translate calls to memcpy et al to G_INTRINSIC_W_SIDE_EFFECTs and legalize later.
I plan on adding memcpy optimizations in the GlobalISel pipeline, but we can't
do that unless we delay lowering to actual function calls. This patch changes
the translator to generate G_INTRINSIC_W_SIDE_EFFECTS for these functions, and
then have each target specify that using the new custom legalizer for intrinsics
hook that they want it expanded it a libcall.
Differential Revision: https://reviews.llvm.org/D64895
llvm-svn: 366516
Diffstat (limited to 'llvm/test/CodeGen/Mips/GlobalISel')
| -rw-r--r-- | llvm/test/CodeGen/Mips/GlobalISel/irtranslator/call.ll | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/test/CodeGen/Mips/GlobalISel/irtranslator/call.ll b/llvm/test/CodeGen/Mips/GlobalISel/irtranslator/call.ll index c76750208fc..b8475835478 100644 --- a/llvm/test/CodeGen/Mips/GlobalISel/irtranslator/call.ll +++ b/llvm/test/CodeGen/Mips/GlobalISel/irtranslator/call.ll @@ -153,12 +153,7 @@ define void @call_symbol(i8* nocapture readonly %src, i8* nocapture %dest, i32 s ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2 - ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp - ; MIPS32: $a0 = COPY [[COPY1]](p0) - ; MIPS32: $a1 = COPY [[COPY]](p0) - ; MIPS32: $a2 = COPY [[COPY2]](s32) - ; MIPS32: JAL &memcpy, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit $a2 - ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp + ; MIPS32: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.memcpy), [[COPY1]](p0), [[COPY]](p0), [[COPY2]](s32) :: (store 1 into %ir.dest), (load 1 from %ir.src) ; MIPS32: RetRA ; MIPS32_PIC-LABEL: name: call_symbol ; MIPS32_PIC: bb.1.entry: @@ -166,12 +161,7 @@ define void @call_symbol(i8* nocapture readonly %src, i8* nocapture %dest, i32 s ; MIPS32_PIC: [[COPY:%[0-9]+]]:_(p0) = COPY $a0 ; MIPS32_PIC: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1 ; MIPS32_PIC: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2 - ; MIPS32_PIC: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp - ; MIPS32_PIC: $a0 = COPY [[COPY1]](p0) - ; MIPS32_PIC: $a1 = COPY [[COPY]](p0) - ; MIPS32_PIC: $a2 = COPY [[COPY2]](s32) - ; MIPS32_PIC: JAL &memcpy, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit $a2 - ; MIPS32_PIC: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp + ; MIPS32_PIC: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.memcpy), [[COPY1]](p0), [[COPY]](p0), [[COPY2]](s32) :: (store 1 into %ir.dest), (load 1 from %ir.src) ; MIPS32_PIC: RetRA entry: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %dest, i8* align 1 %src, i32 %length, i1 false) |

