mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Don't attempt to handle aggregate argument values in FastISel; let
SelectionDAG do those. This fixes PR3955. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68546 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -57,11 +57,15 @@
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
unsigned FastISel::getRegForValue(Value *V) {
|
unsigned FastISel::getRegForValue(Value *V) {
|
||||||
MVT::SimpleValueType VT = TLI.getValueType(V->getType()).getSimpleVT();
|
MVT RealVT = TLI.getValueType(V->getType(), /*AllowUnknown=*/true);
|
||||||
|
// Don't handle non-simple values in FastISel.
|
||||||
|
if (!RealVT.isSimple())
|
||||||
|
return 0;
|
||||||
|
|
||||||
// Ignore illegal types. We must do this before looking up the value
|
// Ignore illegal types. We must do this before looking up the value
|
||||||
// in ValueMap because Arguments are given virtual registers regardless
|
// in ValueMap because Arguments are given virtual registers regardless
|
||||||
// of whether FastISel can handle them.
|
// of whether FastISel can handle them.
|
||||||
|
MVT::SimpleValueType VT = RealVT.getSimpleVT();
|
||||||
if (!TLI.isTypeLegal(VT)) {
|
if (!TLI.isTypeLegal(VT)) {
|
||||||
// Promote MVT::i1 to a legal type though, because it's common and easy.
|
// Promote MVT::i1 to a legal type though, because it's common and easy.
|
||||||
if (VT == MVT::i1)
|
if (VT == MVT::i1)
|
||||||
|
14
test/CodeGen/X86/fast-isel-bail.ll
Normal file
14
test/CodeGen/X86/fast-isel-bail.ll
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
; RUN: llvm-as < %s | llc -march=x86 -fast
|
||||||
|
|
||||||
|
; This file is for regression tests for cases where FastISel needs
|
||||||
|
; to gracefully bail out and let SelectionDAGISel take over.
|
||||||
|
|
||||||
|
type { i64, i8* } ; type %0
|
||||||
|
|
||||||
|
declare void @bar(%0)
|
||||||
|
|
||||||
|
define fastcc void @foo() nounwind {
|
||||||
|
entry:
|
||||||
|
call void @bar(%0 zeroinitializer)
|
||||||
|
unreachable
|
||||||
|
}
|
Reference in New Issue
Block a user