[llvm-commits] [llvm] r133247 - in /llvm/trunk: lib/AsmParser/ test/CodeGen/CBackend/ test/CodeGen/Generic/ test/CodeGen/X86/ test/Transforms/JumpThreading/ test/Transforms/LoopRotate/ test/Transforms/SCCP/
Chris Lattner
sabre at nondot.org
Thu Jun 16 23:57:16 PDT 2011
Author: lattner
Date: Fri Jun 17 01:57:15 2011
New Revision: 133247
URL: http://llvm.org/viewvc/llvm-project?rev=133247&view=rev
Log:
remove asmparser support for the old getresult instruction, which has been subsumed by extractvalue.
Removed:
llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll
llvm/trunk/test/CodeGen/Generic/getresult-undef.ll
Modified:
llvm/trunk/lib/AsmParser/LLLexer.cpp
llvm/trunk/lib/AsmParser/LLParser.cpp
llvm/trunk/lib/AsmParser/LLParser.h
llvm/trunk/lib/AsmParser/LLToken.h
llvm/trunk/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
llvm/trunk/test/CodeGen/X86/fp-stack-2results.ll
llvm/trunk/test/CodeGen/X86/inline-asm-mrv.ll
llvm/trunk/test/CodeGen/X86/multiple-return-values-cross-block.ll
llvm/trunk/test/Transforms/JumpThreading/crash.ll
llvm/trunk/test/Transforms/LoopRotate/crash.ll
llvm/trunk/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll
Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLLexer.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLLexer.cpp Fri Jun 17 01:57:15 2011
@@ -635,7 +635,6 @@
INSTKEYWORD(extractelement, ExtractElement);
INSTKEYWORD(insertelement, InsertElement);
INSTKEYWORD(shufflevector, ShuffleVector);
- INSTKEYWORD(getresult, ExtractValue);
INSTKEYWORD(extractvalue, ExtractValue);
INSTKEYWORD(insertvalue, InsertValue);
#undef INSTKEYWORD
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Fri Jun 17 01:57:15 2011
@@ -3024,7 +3024,6 @@
return ParseStore(Inst, PFS, true);
else
return TokError("expected 'load' or 'store'");
- case lltok::kw_getresult: return ParseGetResult(Inst, PFS);
case lltok::kw_getelementptr: return ParseGetElementPtr(Inst, PFS);
case lltok::kw_extractvalue: return ParseExtractValue(Inst, PFS);
case lltok::kw_insertvalue: return ParseInsertValue(Inst, PFS);
@@ -3717,25 +3716,6 @@
return AteExtraComma ? InstExtraComma : InstNormal;
}
-/// ParseGetResult
-/// ::= 'getresult' TypeAndValue ',' i32
-/// FIXME: Remove support for getresult in LLVM 3.0
-bool LLParser::ParseGetResult(Instruction *&Inst, PerFunctionState &PFS) {
- Value *Val; LocTy ValLoc, EltLoc;
- unsigned Element;
- if (ParseTypeAndValue(Val, ValLoc, PFS) ||
- ParseToken(lltok::comma, "expected ',' after getresult operand") ||
- ParseUInt32(Element, EltLoc))
- return true;
-
- if (!Val->getType()->isStructTy() && !Val->getType()->isArrayTy())
- return Error(ValLoc, "getresult inst requires an aggregate operand");
- if (!ExtractValueInst::getIndexedType(Val->getType(), Element))
- return Error(EltLoc, "invalid getresult index for value");
- Inst = ExtractValueInst::Create(Val, Element);
- return false;
-}
-
/// ParseGetElementPtr
/// ::= 'getelementptr' 'inbounds'? TypeAndValue (',' TypeAndValue)*
int LLParser::ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS) {
Modified: llvm/trunk/lib/AsmParser/LLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.h?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.h (original)
+++ llvm/trunk/lib/AsmParser/LLParser.h Fri Jun 17 01:57:15 2011
@@ -361,7 +361,6 @@
int ParseAlloc(Instruction *&I, PerFunctionState &PFS);
int ParseLoad(Instruction *&I, PerFunctionState &PFS, bool isVolatile);
int ParseStore(Instruction *&I, PerFunctionState &PFS, bool isVolatile);
- bool ParseGetResult(Instruction *&I, PerFunctionState &PFS);
int ParseGetElementPtr(Instruction *&I, PerFunctionState &PFS);
int ParseExtractValue(Instruction *&I, PerFunctionState &PFS);
int ParseInsertValue(Instruction *&I, PerFunctionState &PFS);
Modified: llvm/trunk/lib/AsmParser/LLToken.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLToken.h?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLToken.h (original)
+++ llvm/trunk/lib/AsmParser/LLToken.h Fri Jun 17 01:57:15 2011
@@ -123,7 +123,7 @@
kw_alloca, kw_load, kw_store, kw_getelementptr,
- kw_extractelement, kw_insertelement, kw_shufflevector, kw_getresult,
+ kw_extractelement, kw_insertelement, kw_shufflevector,
kw_extractvalue, kw_insertvalue, kw_blockaddress,
// Unsigned Valued tokens (UIntVal).
Removed: llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll?rev=133246&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll (original)
+++ llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll (removed)
@@ -1,19 +0,0 @@
-; RUN: llc < %s -march=c
-
-declare {i32, i32} @foo()
-
-define i32 @test() {
- %A = call {i32, i32} @foo()
- %B = getresult {i32, i32} %A, 0
- %C = getresult {i32, i32} %A, 1
- %D = add i32 %B, %C
- ret i32 %D
-}
-
-define i32 @test2() {
- %A = call {i32, i32} asm sideeffect "...", "={cx},={di},~{dirflag},~{fpsr},~{flags},~{memory}"()
- %B = getresult {i32, i32} %A, 0
- %C = getresult {i32, i32} %A, 1
- %D = add i32 %B, %C
- ret i32 %D
-}
Removed: llvm/trunk/test/CodeGen/Generic/getresult-undef.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/getresult-undef.ll?rev=133246&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/getresult-undef.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/getresult-undef.ll (removed)
@@ -1,6 +0,0 @@
-; RUN: llc < %s
-
-define double @foo() {
- %t = getresult {double, double} undef, 1
- ret double %t
-}
Modified: llvm/trunk/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll Fri Jun 17 01:57:15 2011
@@ -6,9 +6,9 @@
%t = invoke { i64, double } @wild() to label %normal unwind label %handler
normal:
- %mrv_gr = getresult { i64, double } %t, 0
+ %mrv_gr = extractvalue { i64, double } %t, 0
store i64 %mrv_gr, i64* %p
- %mrv_gr12681 = getresult { i64, double } %t, 1
+ %mrv_gr12681 = extractvalue { i64, double } %t, 1
store double %mrv_gr12681, double* %q
ret void
Modified: llvm/trunk/test/CodeGen/X86/fp-stack-2results.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fp-stack-2results.ll?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fp-stack-2results.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fp-stack-2results.ll Fri Jun 17 01:57:15 2011
@@ -28,10 +28,10 @@
; Uses both values.
define void @call1(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %b = getresult {x86_fp80,x86_fp80} %a, 0
+ %b = extractvalue {x86_fp80,x86_fp80} %a, 0
store x86_fp80 %b, x86_fp80* %P1
- %c = getresult {x86_fp80,x86_fp80} %a, 1
+ %c = extractvalue {x86_fp80,x86_fp80} %a, 1
store x86_fp80 %c, x86_fp80* %P2
ret void
}
@@ -39,10 +39,10 @@
; Uses both values, requires fxch
define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %b = getresult {x86_fp80,x86_fp80} %a, 1
+ %b = extractvalue {x86_fp80,x86_fp80} %a, 1
store x86_fp80 %b, x86_fp80* %P1
- %c = getresult {x86_fp80,x86_fp80} %a, 0
+ %c = extractvalue {x86_fp80,x86_fp80} %a, 0
store x86_fp80 %c, x86_fp80* %P2
ret void
}
@@ -50,7 +50,7 @@
; Uses ST(0), ST(1) is dead but must be popped.
define void @call3(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %b = getresult {x86_fp80,x86_fp80} %a, 0
+ %b = extractvalue {x86_fp80,x86_fp80} %a, 0
store x86_fp80 %b, x86_fp80* %P1
ret void
}
@@ -59,7 +59,7 @@
define void @call4(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %c = getresult {x86_fp80,x86_fp80} %a, 1
+ %c = extractvalue {x86_fp80,x86_fp80} %a, 1
store x86_fp80 %c, x86_fp80* %P2
ret void
}
Modified: llvm/trunk/test/CodeGen/X86/inline-asm-mrv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/inline-asm-mrv.ll?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/inline-asm-mrv.ll (original)
+++ llvm/trunk/test/CodeGen/X86/inline-asm-mrv.ll Fri Jun 17 01:57:15 2011
@@ -11,7 +11,7 @@
%tmp12 = sext i32 %stride to i64 ; <i64> [#uses=1]
%mrv = call {i32, i8*, i8*} asm sideeffect "$0 $1 $2 $3 $4 $5 $6",
"=r,=r,=r,r,r,r,r"( i64 %tmp12, i32 %h, i8* %blk1, i8* %blk2 ) nounwind
- %tmp6 = getresult {i32, i8*, i8*} %mrv, 0
+ %tmp6 = extractvalue {i32, i8*, i8*} %mrv, 0
%tmp7 = call i32 asm sideeffect "set $0",
"=r,~{dirflag},~{fpsr},~{flags}"( ) nounwind
ret i32 %tmp7
@@ -19,16 +19,16 @@
define <4 x float> @test2() nounwind {
%mrv = call {<4 x float>, <4 x float>} asm "set $0, $1", "=x,=x"()
- %a = getresult {<4 x float>, <4 x float>} %mrv, 0
- %b = getresult {<4 x float>, <4 x float>} %mrv, 1
+ %a = extractvalue {<4 x float>, <4 x float>} %mrv, 0
+ %b = extractvalue {<4 x float>, <4 x float>} %mrv, 1
%c = fadd <4 x float> %a, %b
ret <4 x float> %c
}
define <4 x i32> @test3() nounwind {
%mrv = call {<4 x i32>, <4 x i32>} asm "set $0, $1", "=x,=x"()
- %a = getresult {<4 x i32>, <4 x i32>} %mrv, 0
- %b = getresult {<4 x i32>, <4 x i32>} %mrv, 1
+ %a = extractvalue {<4 x i32>, <4 x i32>} %mrv, 0
+ %b = extractvalue {<4 x i32>, <4 x i32>} %mrv, 1
%c = add <4 x i32> %a, %b
ret <4 x i32> %c
}
Modified: llvm/trunk/test/CodeGen/X86/multiple-return-values-cross-block.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/multiple-return-values-cross-block.ll?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/multiple-return-values-cross-block.ll (original)
+++ llvm/trunk/test/CodeGen/X86/multiple-return-values-cross-block.ll Fri Jun 17 01:57:15 2011
@@ -4,12 +4,12 @@
define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) {
%a = call {x86_fp80,x86_fp80} @test()
- %b = getresult {x86_fp80,x86_fp80} %a, 1
+ %b = extractvalue {x86_fp80,x86_fp80} %a, 1
store x86_fp80 %b, x86_fp80* %P1
br label %L
L:
- %c = getresult {x86_fp80,x86_fp80} %a, 0
+ %c = extractvalue {x86_fp80,x86_fp80} %a, 0
store x86_fp80 %c, x86_fp80* %P2
ret void
}
Modified: llvm/trunk/test/Transforms/JumpThreading/crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/JumpThreading/crash.ll?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/JumpThreading/crash.ll (original)
+++ llvm/trunk/test/Transforms/JumpThreading/crash.ll Fri Jun 17 01:57:15 2011
@@ -18,7 +18,7 @@
br label %bb
bb110: ; preds = %bb
- %mrv_gr124 = getresult %struct.system__secondary_stack__mark_id %tmp120, 1 ; <i64> [#uses=0]
+ %mrv_gr124 = extractvalue %struct.system__secondary_stack__mark_id %tmp120, 1 ; <i64> [#uses=0]
unreachable
}
Modified: llvm/trunk/test/Transforms/LoopRotate/crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopRotate/crash.ll?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopRotate/crash.ll (original)
+++ llvm/trunk/test/Transforms/LoopRotate/crash.ll Fri Jun 17 01:57:15 2011
@@ -113,7 +113,7 @@
br i1 false, label %bb141, label %bb131
bb131: ; preds = %bb116
- %mrv_gr125 = getresult %struct.NSRange %tmp123, 1 ; <i64> [#uses=0]
+ %mrv_gr125 = extractvalue %struct.NSRange %tmp123, 1 ; <i64> [#uses=0]
br label %bb116
bb141: ; preds = %bb116
Modified: llvm/trunk/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll?rev=133247&r1=133246&r2=133247&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll (original)
+++ llvm/trunk/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll Fri Jun 17 01:57:15 2011
@@ -5,7 +5,7 @@
define i32 @foo() {
%X = call {i32, i32} @bar(i32 17)
- %Y = getresult {i32, i32} %X, 0
+ %Y = extractvalue {i32, i32} %X, 0
%Z = add i32 %Y, %Y
ret i32 %Z
}
More information about the llvm-commits
mailing list