diff options
| author | Chad Rosier <mcrosier@apple.com> | 2012-02-17 01:21:28 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@apple.com> | 2012-02-17 01:21:28 +0000 |
| commit | fcd29ae3900f460d35ac5fee047f9ec6fe62e897 (patch) | |
| tree | c99c6dfe347d93c0ccc04e9f5b712a2bfb1f882d /llvm/lib | |
| parent | d9f2152a2e51835b2781a1a9e321515b67c6d991 (diff) | |
| download | bcm5719-llvm-fcd29ae3900f460d35ac5fee047f9ec6fe62e897.tar.gz bcm5719-llvm-fcd29ae3900f460d35ac5fee047f9ec6fe62e897.zip | |
[fast-isel] Add support for returning non-legal types with no sign- or zero-
entend flag.
llvm-svn: 150774
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMFastISel.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp index 21c1f86442e..51c44d0adb0 100644 --- a/llvm/lib/Target/ARM/ARMFastISel.cpp +++ b/llvm/lib/Target/ARM/ARMFastISel.cpp @@ -2037,14 +2037,14 @@ bool ARMFastISel::SelectRet(const Instruction *I) { if (RVVT != MVT::i1 && RVVT != MVT::i8 && RVVT != MVT::i16) return false; - if (!Outs[0].Flags.isZExt() && !Outs[0].Flags.isSExt()) - return false; - assert(DestVT == MVT::i32 && "ARM should always ext to i32"); - bool isZExt = Outs[0].Flags.isZExt(); - SrcReg = ARMEmitIntExt(RVVT, SrcReg, DestVT, isZExt); - if (SrcReg == 0) return false; + // Perform extension if flagged as either zext or sext. Otherwise, do + // nothing. + if (Outs[0].Flags.isZExt() || Outs[0].Flags.isSExt()) { + SrcReg = ARMEmitIntExt(RVVT, SrcReg, DestVT, Outs[0].Flags.isZExt()); + if (SrcReg == 0) return false; + } } // Make the copy. |

