diff options
| author | Dan Gohman <dan433584@gmail.com> | 2013-01-31 02:45:26 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2013-01-31 02:45:26 +0000 |
| commit | 36fa8398f5a6d8857f8a51c41337008f288cb333 (patch) | |
| tree | d19c3d0d91b782e79a27fd35a970ab73c16eb766 /llvm/lib/Analysis | |
| parent | 1b0f79de0af2b9c0cf71b4aa4d33cef039635897 (diff) | |
| download | bcm5719-llvm-36fa8398f5a6d8857f8a51c41337008f288cb333.tar.gz bcm5719-llvm-36fa8398f5a6d8857f8a51c41337008f288cb333.zip | |
Add a comment.
llvm-svn: 174028
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index 9f2aa59863f..18d90b62ce3 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -663,6 +663,10 @@ Value *llvm::SimplifyAddInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, /// accumulates the total constant offset applied in the returned constant. It /// returns 0 if V is not a pointer, and returns the constant '0' if there are /// no constant offsets applied. +/// +/// This is very similar to GetPointerBaseWithConstantOffset except it doesn't +/// follow non-inbounds geps. This allows it to remain usable for icmp ult/etc. +/// folding. static Constant *stripAndComputeConstantOffsets(const DataLayout &TD, Value *&V) { assert(V->getType()->isPointerTy()); |

