[PATCH] D37640: [GISel]: Fix generation of illegal COPYs (of different sizes) during CallLowering

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 13:05:27 PDT 2017


aditya_nandakumar created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

We end up creating COPY's that are either truncating/extending and this should be illegal.
Eg %0(s8) = COPY %w0
 Instead, we generate TRUNCs/ANY_EXT and let the optimizer deal with it later.
%tmp(s32) = COPY %w0
%0(s8) = G_TRUNC %tmp(s32)

I've updated the AArch64 backend, I'd appreciate it if people more familiar with X86/ARM can update it as well(post feedback).

Looking forward to your comments.


Repository:
  rL LLVM

https://reviews.llvm.org/D37640

Files:
  include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
  lib/CodeGen/GlobalISel/CallLowering.cpp
  lib/Target/AArch64/AArch64CallLowering.cpp
  test/CodeGen/AArch64/GlobalISel/arm64-callingconv.ll
  test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
  test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
  test/CodeGen/AArch64/GlobalISel/call-translator.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37640.114421.patch
Type: text/x-patch
Size: 7377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170908/9067150d/attachment.bin>


More information about the llvm-commits mailing list