[PATCH] D89387: [ValueTracking] Clarify TypeSize comparisons
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 00:27:57 PDT 2020
david-arm accepted this revision.
david-arm added a comment.
This revision is now accepted and ready to land.
LGTM!
================
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() <=
----------------
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.
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