[llvm-commits] [PATCH] ARM: Custom lower v2f32 = fp_round to fix crash with NEON

Pete Couperus pjcoup at gmail.com
Wed Nov 14 20:22:57 PST 2012


Hi Eli,

On Wed, Nov 14, 2012 at 5:58 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Tue, Nov 13, 2012 at 11:24 PM, Pete Couperus <pjcoup at gmail.com> wrote:
> > Hello,
> >
> > Lowering "fptrunc <2 x double> %a to <2 x float>" is broken on ARM with
> > NEON.
> > This patch custom lowers this conversion using two single element vcvt's.
> > This fixes the following PRs.
> >
> > http://llvm.org/bugs/show_bug.cgi?id=12540
> > http://llvm.org/bugs/show_bug.cgi?id=13964
> >
> > Please review!
> > Thanks.
>
> Does "setOperationAction(ISD::FP_ROUND, MVT::v2f32, Expand)" not do
> the right thing here?
>
> -Eli
>

No, setting FP_ROUND to expand for v2f32 gets an assert in a different
place:

llc:
/home/peter/llvm/llvm-svn/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:840:
void <anonymous
namespace>::SelectionDAGLegalize::LegalizeStoreOps(llvm::SDNode *):
Assertion `!StVT.isVector() && "Vector Stores are handled in
LegalizeVectorOps"' failed.

Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121114/53af1bb1/attachment.html>


More information about the llvm-commits mailing list