This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix crash caused by performExtractVectorEltCombine on DUP nodes with float operands.
ClosedPublic

Authored by zjaffal on Apr 19 2023, 4:23 AM.

Diff Detail

Event Timeline

zjaffal created this revision.Apr 19 2023, 4:23 AM
zjaffal requested review of this revision.Apr 19 2023, 4:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2023, 4:23 AM
dmgreen added inline comments.Apr 19 2023, 4:51 AM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
16734–16735

It might be better to use allow the floating point value to fold too:

if (N0.getOpcode() == AArch64ISD::DUP)
  return VT.isInteger() ? DAG.getZExtOrTrunc(N0.getOperand(0), SDLoc(N), VT)
                        : N0.getOperand(0);
llvm/test/CodeGen/AArch64/aarch64-dup-dot-crash.ll
10

Can you add update_llc_test_checks output too.

zjaffal updated this revision to Diff 514975.Apr 19 2023, 8:50 AM

Update test and address comments

dmgreen accepted this revision.Apr 19 2023, 10:28 AM

Thanks for the fix and sorry for causing the bug. LGTM

This revision is now accepted and ready to land.Apr 19 2023, 10:28 AM
fhahn added a comment.Apr 21 2023, 8:19 AM

@zjaffal is out-of-office, I'll land the change on his behalf in the meantime to fix the crash

This revision was landed with ongoing or failed builds.Apr 21 2023, 8:20 AM
This revision was automatically updated to reflect the committed changes.