Displaying 3 results from an estimated 3 matches for "ptrop".
Did you mean:
prop
2009 Apr 17
0
[LLVMdev] llvm-ld (instruction combine) breaking for this test.
...nto one, and while creating the new one it is
passing i16 as type of index args. (as PointerWidth on pic16 is i16).
// Find out whether the last index in the source GEP is a sequential idx.
bool EndsWithSequential = false;
for (gep_type_iterator I = gep_type_begin(*cast<User>(PtrOp)),
E = gep_type_end(*cast<User>(PtrOp)); I != E; ++I)
EndsWithSequential = ! isa<StructType>(*I);
// Can we combine the two pointer arithmetics offsets?
if (EndsWithSequential) {
// Replace: gep (gep %P, long B), long A, ...
// With: T = long A+...
2017 Aug 10
4
InstCombine GEP
...* to B*
1916 /// Y = gep X, <...constant indices...>
1917 /// into a gep of the original struct. This is important for SROA and alias
1918 /// analysis of unions. If "A" is also a bitcast, wait for A/X to be merged.
1919 if (BitCastInst *BCI = dyn_cast<BitCastInst>(PtrOp)) {
1920 ....
I'm not sure how transforming GEP offset to i8 type will help alias analysis & SROA for the mentioned test case.
Regards,
Ashutosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/201...
2020 Mar 23
3
[InstCombine] Addrspacecast and GEP assumed commutative
...his?
It appears that the following lines are the root cause of the reordering (https://github.com/llvm/llvm-project/blob/fdcb27105537f77c78c4473d4f7c47146ddbab69/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L2175):
// Handle gep(bitcast x) and gep(gep x, 0, 0, 0).
Value *StrippedPtr = PtrOp->stripPointerCasts();
PointerType *StrippedPtrTy = cast<PointerType>(StrippedPtr->getType());
Namely, the stripPointerCasts function also strips address spaces.
Would replacing this by stripPointerCastsSameRepresentation be an acceptable solution, or do other parts of LLVM rely on this...