Skip to content

Commit a618e1a

Browse files
authored
[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 <vyacheslav.n.klochkov@intel.com>
1 parent 97aec64 commit a618e1a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/SYCLLowerIR/LowerESIMD.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,15 +885,14 @@ static Instruction *generateGenXCall(ExtractElementInst *EEI,
885885
EEI->getModule(), ID, FixedVectorType::get(I32Ty, MAX_DIMS))
886886
: GenXIntrinsic::getGenXDeclaration(EEI->getModule(), ID);
887887

888-
std::string ResultName =
889-
(Twine(EEI->getNameOrAsOperand()) + "." + FullIntrinName).str();
888+
std::string ResultName = (Twine(EEI->getName()) + "." + FullIntrinName).str();
890889
Instruction *Inst = IntrinsicInst::Create(NewFDecl, {}, ResultName, EEI);
891890
Inst->setDebugLoc(EEI->getDebugLoc());
892891

893892
if (IsVectorCall) {
894893
Type *I32Ty = Type::getInt32Ty(EEI->getModule()->getContext());
895894
std::string ExtractName =
896-
(Twine(Inst->getNameOrAsOperand()) + ".ext." + Twine(IndexValue)).str();
895+
(Twine(Inst->getName()) + ".ext." + Twine(IndexValue)).str();
897896
Inst = ExtractElementInst::Create(Inst, ConstantInt::get(I32Ty, IndexValue),
898897
ExtractName, EEI);
899898
Inst->setDebugLoc(EEI->getDebugLoc());

0 commit comments

Comments
 (0)