[PATCH] D86686: [PowerPC] Fix store-fptoi combine of f128 on Power8

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 01:16:02 PDT 2020


qiucf created this revision.
qiucf added reviewers: PowerPC, nemanjai, steven.zhang, jsji, lei, ZhangKang.
Herald added subscribers: llvm-commits, shchenz, kbarton, hiraditya.
Herald added a project: LLVM.
qiucf requested review of this revision.

llc would crash for the below when `-mcpu=pwr8`:

  define void @qpConv2uw_02(i32* nocapture %res) {
  entry:
    %0 = load fp128, fp128* getelementptr inbounds ([4 x fp128], [4 x fp128]* @f128Array, i64 0, i64 2), align 16
    %conv = fptoui fp128 %0 to i32
    store i32 %conv, i32* %res, align 4
    ret void
  }

We should not generate `FP_TO_(S|U)INT_IN_VSR` for f128 types at this time. This patch will fix that.


https://reviews.llvm.org/D86686

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86686.288223.patch
Type: text/x-patch
Size: 3097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200827/fd9ccd4b/attachment.bin>


More information about the llvm-commits mailing list