Issue |
90487
|
Summary |
Why does stripPointerCasts on CallBase do getReturnedArgOperand
|
Labels |
|
Assignees |
|
Reporter |
fkil
|
I've been tracking down a bug in my `opt` pass and was able to track it down to a weird behavior in LLVM that I'm not sure is a bug or intended. Specifically, when `stripPointerCasts` is called on a `CallBase` the result of `getReturnedArgOperand` is returned (if the return value would not be NULL).
After inspecting the source code of `llvm/lib/IR/Value.cpp`, the cause for it is in `stripPointerCastAndOffsets` and was initially introduced in the following commit: https://github.com/llvm/llvm-project/commit/5c12d8fe8f7ac9a3ec13ddad1561d63477e014f6
It seems to happen for every such CallBase.
While I can understand the usefulness for Alias Analysis, the behavior in general confuses me and is not documented. Is this behavior intended?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs