1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Alter 79292 to produce output that actually assembles.

llvm-svn: 80119
This commit is contained in:
Dale Johannesen 2009-08-26 18:10:32 +00:00
parent 294213c735
commit ca67bcd630
2 changed files with 6 additions and 1 deletions

View File

@ -518,7 +518,9 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
if (ExtraCode && ExtraCode[0])
return true; // Unknown modifier.
assert (MI->getOperand(OpNo).isReg());
O << "0(";
printOperand(MI, OpNo);
O << ")";
return false;
}

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s | llc -march=ppc32 | grep add
; RUN: llvm-as < %s | llc -march=ppc32 | FileCheck %s
; ModuleID = '<stdin>'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin10.0"
@ -9,6 +9,9 @@ target triple = "powerpc-apple-darwin10.0"
define void @foo(i32 %y) nounwind ssp {
entry:
; CHECK: foo
; CHECK: add r2
; CHECK: 0(r2)
%y_addr = alloca i32 ; <i32*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %y, i32* %y_addr