[PATCH] D29925: Implement intrinsic mangling for literal struct types.Fixes PR 31921
mattias.v.eriksson@ericsson.com via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 27 01:54:11 PST 2017
materi added a comment.
Hi!
I think this commit is causing a bug in my out-of-tree target. From opt -lint I started seeing messages like this:
Undefined behavior: Caller and callee calling convention differ
%1 = call %rec8 @llvm.phx.llmac.i32.u32.s_rec8s(i32 %_tmp1, i32 %_tmp2, i32 %_tmp5, i32 %_tmp4), !dbg !10 (tmp.c:4:15)
The calling convention is dropped in UpgradeIntrinsicCall. It looks like this is easy to fix by just transferring the calling convention to the created CallInst here, is this correct?
================
Comment at: llvm/trunk/lib/IR/AutoUpgrade.cpp:1837
+ CI->arg_operands().end());
+ CI->replaceAllUsesWith(Builder.CreateCall(NewFn, Args));
+ CI->eraseFromParent();
----------------
The calling convention of CI does not carry over to the new call here.
Repository:
rL LLVM
https://reviews.llvm.org/D29925
More information about the llvm-commits
mailing list