Fix crash from assert in r279466.

The assert in r279466 checks that we call the correct version of
Intrinsic::getName.  The version which accepts only an ID should not
be used for intrinsics with overloaded types.  The global-isel
code was calling the wrong version.  The test CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
will ensure that we call the correct version from now on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279487 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper 2016-08-22 22:27:05 +00:00
parent fd2abc5908
commit 72d647d689

View File

@ -883,7 +883,7 @@ void MIPrinter::print(const MachineOperand &Op, const TargetRegisterInfo *TRI,
case MachineOperand::MO_IntrinsicID: {
Intrinsic::ID ID = Op.getIntrinsicID();
if (ID < Intrinsic::num_intrinsics)
OS << "intrinsic(@" << Intrinsic::getName(ID) << ')';
OS << "intrinsic(@" << Intrinsic::getName(ID, None) << ')';
else {
const MachineFunction &MF = *Op.getParent()->getParent()->getParent();
const TargetIntrinsicInfo *TII = MF.getTarget().getIntrinsicInfo();