[llvm] [StackSafetyAnalysis] Don't call getTruncateOrZeroExtend for pointers of different sizes (PR #79804)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 06:26:45 PST 2024


================
@@ -268,13 +276,28 @@ class StackSafetyLocalAnalysis {
   FunctionInfo<GlobalValue> run();
 };
 
+const SCEV *StackSafetyLocalAnalysis::getSCEVAsPointer(Value *Val) {
+  Type *ValTy = Val->getType();
+
+  auto *PtrTy = PointerType::getUnqual(SE.getContext());
+  if (ValTy->isPointerTy()) {
----------------
nikic wrote:

Is this ever false? I don't think this code is working on anything but pointers.

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


More information about the llvm-commits mailing list