File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -966,25 +966,22 @@ class EarlyCSE {
966966 const ParseMemoryInst &Later);
967967
968968 Value *getOrCreateResult (Instruction *Inst, Type *ExpectedType) const {
969- if (! isa<IntrinsicInst, LoadInst, StoreInst>(Inst))
970- llvm_unreachable ( " Instruction not supported" );
969+ assert (( isa<IntrinsicInst, LoadInst, StoreInst>(Inst)) &&
970+ " Instruction not supported" );
971971
972972 // The load or the store's first operand.
973973 Value *V;
974974 if (auto *II = dyn_cast<IntrinsicInst>(Inst)) {
975- if (isHandledNonTargetIntrinsic (II->getIntrinsicID ()))
976- switch (II->getIntrinsicID ()) {
977- case Intrinsic::masked_load:
978- V = II;
979- break ;
980- case Intrinsic::masked_store:
981- V = II->getOperand (0 );
982- break ;
983- default :
984- return nullptr ;
985- }
986- else
975+ switch (II->getIntrinsicID ()) {
976+ case Intrinsic::masked_load:
977+ V = II;
978+ break ;
979+ case Intrinsic::masked_store:
980+ V = II->getOperand (0 );
981+ break ;
982+ default :
987983 return TTI.getOrCreateResultFromMemIntrinsic (II, ExpectedType);
984+ }
988985 } else {
989986 V = isa<LoadInst>(Inst) ? Inst : cast<StoreInst>(Inst)->getValueOperand ();
990987 }
You can’t perform that action at this time.
0 commit comments