[llvm] [CodeGen] Use TargetLowering for TypeInfo of PointerTy (PR #93469)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 27 05:55:30 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-x86

Author: Jan Patrick Lehr (jplehr)

<details>
<summary>Changes</summary>

This uses the TargetLowering getSimpleValueType mechanism to retrieve the ValueType info and work around a build issue we were seeing for the miniQMC application after
https://github.com/llvm/llvm-project/pull/92671.

---
Full diff: https://github.com/llvm/llvm-project/pull/93469.diff


1 Files Affected:

- (modified) llvm/lib/Target/X86/X86TargetTransformInfo.cpp (+2-1) 


``````````diff
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index ac66144aeaaec..6616fe9274a56 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -6257,7 +6257,8 @@ InstructionCost X86TTIImpl::getInterleavedMemoryOpCostAVX512(
                                 AddressSpace, CostKind);
 
   unsigned VF = VecTy->getNumElements() / Factor;
-  MVT VT = MVT::getVectorVT(MVT::getVT(VecTy->getScalarType()), VF);
+  MVT VT =
+      MVT::getVectorVT(TLI->getSimpleValueType(DL, VecTy->getScalarType()), VF);
 
   InstructionCost MaskCost;
   if (UseMaskedMemOp) {

``````````

</details>


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


More information about the llvm-commits mailing list