[PATCH] D65261: [PowerPC] Fix ICE when truncating to vector with odd-size elements.

Chaofan Qiu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 19:49:56 PDT 2019


qiucf created this revision.
qiucf added reviewers: hfinkel, jsji, kbarton, nemanjai, RolandF.
qiucf added a project: LLVM.
Herald added subscribers: llvm-commits, shchenz, MaskRay, hiraditya.

In type legalizing on PowerPC platform, when we are going to truncate normal vectors into vectors with elements whose size is not power of 2, the compiler will hit an assert complaining size-mismatch. Since such situation is rare, I add a check to prevent the `trunc` being optimized if the size of element is not power of 2.


Repository:
  rL LLVM

https://reviews.llvm.org/D65261

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/test/CodeGen/PowerPC/pr25080.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65261.211662.patch
Type: text/x-patch
Size: 4826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190725/117ab9a4/attachment.bin>


More information about the llvm-commits mailing list