mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[PowerPC] Turn deprecated altivec prefetch instrs to nops on AIX
The dst/dstt/dstst/dststt instructions are nop's on all PowerPC cores that AIX supports. The AIX assembler also does not accept these mnemonics. Turn them into nop's on AIX (similar to dstall).
This commit is contained in:
parent
11aa71a71d
commit
8b3f85a32c
@ -2574,6 +2574,18 @@ void PPCAIXAsmPrinter::emitInstruction(const MachineInstr *MI) {
|
||||
if (MI->getOperand(0).isSymbol())
|
||||
report_fatal_error("Tail call for extern symbol not yet supported.");
|
||||
break;
|
||||
case PPC::DST:
|
||||
case PPC::DST64:
|
||||
case PPC::DSTT:
|
||||
case PPC::DSTT64:
|
||||
case PPC::DSTST:
|
||||
case PPC::DSTST64:
|
||||
case PPC::DSTSTT:
|
||||
case PPC::DSTSTT64:
|
||||
EmitToStreamer(
|
||||
*OutStreamer,
|
||||
MCInstBuilder(PPC::ORI).addReg(PPC::R0).addReg(PPC::R0).addImm(0));
|
||||
return;
|
||||
}
|
||||
return PPCAsmPrinter::emitInstruction(MI);
|
||||
}
|
||||
|
@ -1,6 +1,39 @@
|
||||
; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mattr=+altivec | grep dst | count 4
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-- -mattr=+altivec | \
|
||||
; RUN: FileCheck %s
|
||||
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-aix- \
|
||||
; RUN: -mattr=+altivec | FileCheck %s --check-prefix=AIX64
|
||||
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-aix- -mattr=+altivec | \
|
||||
; RUN: FileCheck %s --check-prefix=AIX32
|
||||
|
||||
|
||||
define hidden void @_Z4borkPc(i8* %image) {
|
||||
; CHECK-LABEL: _Z4borkPc:
|
||||
; CHECK: # %bb.0: # %entry
|
||||
; CHECK-NEXT: li 4, 8
|
||||
; CHECK-NEXT: dst 3, 4, 0
|
||||
; CHECK-NEXT: dstt 3, 4, 0
|
||||
; CHECK-NEXT: dstst 3, 4, 0
|
||||
; CHECK-NEXT: dststt 3, 4, 0
|
||||
; CHECK-NEXT: blr
|
||||
;
|
||||
; AIX64-LABEL: _Z4borkPc:
|
||||
; AIX64: # %bb.0: # %entry
|
||||
; AIX64-NEXT: li 4, 8
|
||||
; AIX64-NEXT: nop
|
||||
; AIX64-NEXT: nop
|
||||
; AIX64-NEXT: nop
|
||||
; AIX64-NEXT: nop
|
||||
; AIX64-NEXT: blr
|
||||
;
|
||||
; AIX32-LABEL: _Z4borkPc:
|
||||
; AIX32: # %bb.0: # %entry
|
||||
; AIX32-NEXT: li 4, 8
|
||||
; AIX32-NEXT: nop
|
||||
; AIX32-NEXT: nop
|
||||
; AIX32-NEXT: nop
|
||||
; AIX32-NEXT: nop
|
||||
; AIX32-NEXT: blr
|
||||
entry:
|
||||
tail call void @llvm.ppc.altivec.dst( i8* %image, i32 8, i32 0 )
|
||||
tail call void @llvm.ppc.altivec.dstt( i8* %image, i32 8, i32 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user