[llvm] [X86][SimplifyCFG][CodeGen] Support hoisting load/store with conditional faulting (PR #95515)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 06:54:24 PDT 2024


================
@@ -5062,17 +5083,22 @@ X86TTIImpl::getMaskedMemoryOpCost(unsigned Opcode, Type *SrcTy, Align Alignment,
   std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(SrcVTy);
   auto VT = TLI->getValueType(DL, SrcVTy);
   InstructionCost Cost = 0;
-  if (VT.isSimple() && LT.second != VT.getSimpleVT() &&
+  MVT Ty = LT.second;
+  if (Ty == MVT::i16 || Ty == MVT::i32 || Ty == MVT::i64)
----------------
phoebewang wrote:

Don't we need to check `hasCF`? Why don't check `<1 x i16>` etc.?


https://github.com/llvm/llvm-project/pull/95515


More information about the llvm-commits mailing list