[PATCH] D89387: [ValueTracking] Clarify TypeSize comparisons

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 03:11:28 PDT 2020


c-rhodes added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2258
           CE->getOpcode() == Instruction::PtrToInt)
-        if (Q.DL.getTypeSizeInBits(CE->getOperand(0)->getType()) <=
-            Q.DL.getTypeSizeInBits(CE->getType()))
+        if (Q.DL.getTypeSizeInBits(CE->getOperand(0)->getType())
+                .getFixedSize() <=
----------------
david-arm wrote:
> In general I think IntToPtr instructions could take scalable vectors as operands, at least looking at InstCombinerImpl::visitIntToPtr suggests that. This is probably ok for now because we bail out for scalable vectors at the top of the function.
> In general I think IntToPtr instructions could take scalable vectors as operands, at least looking at InstCombinerImpl::visitIntToPtr suggests that. This is probably ok for now because we bail out for scalable vectors at the top of the function.

Yeah it would be a vector of pointers so it should be caught by the existing bail out I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89387/new/

https://reviews.llvm.org/D89387



More information about the llvm-commits mailing list