From a618e1ac287f99e3fdef63acaf6ba1b6d29cab5a Mon Sep 17 00:00:00 2001 From: Vyacheslav Klochkov Date: Sun, 10 Oct 2021 05:22:53 -0700 Subject: [PATCH] [ESIMD] Fix build error showed with disabled asserts (#4733) Surprisingly Instruction->getNameOrAsOperand() is not defined when asserts are disabled. Replaced that method usage with getName() method. Signed-off-by: Vyacheslav N Klochkov --- llvm/lib/SYCLLowerIR/LowerESIMD.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/lib/SYCLLowerIR/LowerESIMD.cpp b/llvm/lib/SYCLLowerIR/LowerESIMD.cpp index f0067c7bf7f34..6c979d3ada026 100644 --- a/llvm/lib/SYCLLowerIR/LowerESIMD.cpp +++ b/llvm/lib/SYCLLowerIR/LowerESIMD.cpp @@ -885,15 +885,14 @@ static Instruction *generateGenXCall(ExtractElementInst *EEI, EEI->getModule(), ID, FixedVectorType::get(I32Ty, MAX_DIMS)) : GenXIntrinsic::getGenXDeclaration(EEI->getModule(), ID); - std::string ResultName = - (Twine(EEI->getNameOrAsOperand()) + "." + FullIntrinName).str(); + std::string ResultName = (Twine(EEI->getName()) + "." + FullIntrinName).str(); Instruction *Inst = IntrinsicInst::Create(NewFDecl, {}, ResultName, EEI); Inst->setDebugLoc(EEI->getDebugLoc()); if (IsVectorCall) { Type *I32Ty = Type::getInt32Ty(EEI->getModule()->getContext()); std::string ExtractName = - (Twine(Inst->getNameOrAsOperand()) + ".ext." + Twine(IndexValue)).str(); + (Twine(Inst->getName()) + ".ext." + Twine(IndexValue)).str(); Inst = ExtractElementInst::Create(Inst, ConstantInt::get(I32Ty, IndexValue), ExtractName, EEI); Inst->setDebugLoc(EEI->getDebugLoc());