[PATCH] D74485: [ARM] Fix ReconstructShuffle for bigendian

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 06:31:36 PST 2020


dmgreen created this revision.
dmgreen added reviewers: simon_tatham, samparker, SjoerdMeijer, ostannard.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.

Simon pointed out that this function is doing a bitcast, which can be incorrect for big endian. This makes the lowering of VMOVN in MVE incorrect, but the function is shared between Neon and MVE so both can be incorrect.

This attempts to fix things by using the newly added VECTOR_REG_CAST instead of the BITCAST. As it may now be used on Neon, I've added the relevant patterns for it there too. I've also added a quick dag combine for it, to remove them where possible.


https://reviews.llvm.org/D74485

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/ARM/ARMInstrInfo.td
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/lib/Target/ARM/ARMInstrNEON.td
  llvm/test/CodeGen/ARM/neon-vmovn.ll
  llvm/test/CodeGen/Thumb2/mve-vmovn.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74485.244154.patch
Type: text/x-patch
Size: 8561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200212/5e5133bf/attachment.bin>


More information about the llvm-commits mailing list