summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64FastISel.cpp
diff options
context:
space:
mode:
authorLouis Gerbarg <lgg@apple.com>2014-07-09 17:54:32 +0000
committerLouis Gerbarg <lgg@apple.com>2014-07-09 17:54:32 +0000
commit1ce0c37bf058d493ab320c6bd8d60693aebe92c9 (patch)
treef27ed9650544f4a3343deeb92360e85d3764bb59 /llvm/lib/Target/AArch64/AArch64FastISel.cpp
parent7ae7a831b9df0cc971fa2cd4a4dd0887fac5b8df (diff)
downloadbcm5719-llvm-1ce0c37bf058d493ab320c6bd8d60693aebe92c9.tar.gz
bcm5719-llvm-1ce0c37bf058d493ab320c6bd8d60693aebe92c9.zip
Make AArch64FastISel::EmitIntExt explicitly check its source and destination types
This is a follow up to r212492. There should be no functional difference, but this patch makes it clear that SrcVT must be an i1/i8/16/i32 and DestVT must be an i8/i16/i32/i64. rdar://17516686 llvm-svn: 212633
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64FastISel.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64FastISel.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64FastISel.cpp b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
index d822c1bf327..c4e0ff0c38c 100644
--- a/llvm/lib/Target/AArch64/AArch64FastISel.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
@@ -1751,9 +1751,14 @@ unsigned AArch64FastISel::EmitIntExt(MVT SrcVT, unsigned SrcReg, MVT DestVT,
bool isZExt) {
assert(DestVT != MVT::i1 && "ZeroExt/SignExt an i1?");
- // FastISel does not have plumbing to deal with an MVT::i128, if we see one
- // so rather than return one we need to bail out to SelectionDAG.
- if (DestVT == MVT::i128)
+ // FastISel does not have plumbing to deal with extensions where the SrcVT or
+ // DestVT are odd things, so test to make sure that they are both types we can
+ // handle (i1/i8/i16/i32 for SrcVT and i8/i16/i32/i64 for DestVT), otherwise
+ // bail out to SelectionDAG.
+ if (((DestVT != MVT::i8) && (DestVT != MVT::i16) &&
+ (DestVT != MVT::i32) && (DestVT != MVT::i64)) ||
+ ((SrcVT != MVT::i1) && (SrcVT != MVT::i8) &&
+ (SrcVT != MVT::i16) && (SrcVT != MVT::i32)))
return 0;
unsigned Opc;
OpenPOWER on IntegriCloud