From 00ce0f6512a36ff18fcd223dfebc5469e3600652 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sun, 19 May 2013 19:14:24 +0000 Subject: [PATCH] Handle i64 FrameIndex nodes in SPARC v9 mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182216 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcInstrInfo.td | 2 +- test/CodeGen/SPARC/64bit.ll | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td index baefb0642d4..740390f3f56 100644 --- a/lib/Target/Sparc/SparcInstrInfo.td +++ b/lib/Target/Sparc/SparcInstrInfo.td @@ -463,7 +463,7 @@ defm ADD : F3_12<"add", 0b000000, add>; def LEA_ADDri : F3_2<2, 0b000000, (outs IntRegs:$dst), (ins MEMri:$addr), "add ${addr:arith}, $dst", - [(set i32:$dst, ADDRri:$addr)]>; + [(set iPTR:$dst, ADDRri:$addr)]>; let Defs = [ICC] in defm ADDCC : F3_12<"addcc", 0b010000, addc>; diff --git a/test/CodeGen/SPARC/64bit.ll b/test/CodeGen/SPARC/64bit.ll index 2bbf7deb168..37dcea9891d 100644 --- a/test/CodeGen/SPARC/64bit.ll +++ b/test/CodeGen/SPARC/64bit.ll @@ -181,3 +181,13 @@ define i64 @unsigned_divide(i64 %a, i64 %b) { %r = udiv i64 %a, %b ret i64 %r } + +define void @access_fi() { +entry: + %b = alloca [32 x i8], align 1 + %arraydecay = getelementptr inbounds [32 x i8]* %b, i64 0, i64 0 + call void @g(i8* %arraydecay) #2 + ret void +} + +declare void @g(i8*)