diff options
author | Dan Gohman <gohman@apple.com> | 2009-04-07 20:40:11 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-04-07 20:40:11 +0000 |
commit | ca93aabeba8f7449f1725365647be015f4bc0519 (patch) | |
tree | 52b382716e8eca49e55e37c248d70ba7f79f934d /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | fde2110aa9c1aee6e739ed7641056b36c00dc92a (diff) | |
download | bcm5719-llvm-ca93aabeba8f7449f1725365647be015f4bc0519.tar.gz bcm5719-llvm-ca93aabeba8f7449f1725365647be015f4bc0519.zip |
Don't attempt to handle aggregate argument values in FastISel; let
SelectionDAG do those. This fixes PR3955.
llvm-svn: 68546
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 6f09f794ea4..eefe8a2884a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -57,11 +57,15 @@ using namespace llvm; 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 // in ValueMap because Arguments are given virtual registers regardless // of whether FastISel can handle them. + MVT::SimpleValueType VT = RealVT.getSimpleVT(); if (!TLI.isTypeLegal(VT)) { // Promote MVT::i1 to a legal type though, because it's common and easy. if (VT == MVT::i1) |