[llvm] r213117 - Fix comment in InstCombiner::visitAddrSpaceCast.

Manuel Jacob me at manueljacob.de
Tue Jul 15 18:34:37 PDT 2014


Author: mjacob
Date: Tue Jul 15 20:34:21 2014
New Revision: 213117

URL: http://llvm.org/viewvc/llvm-project?rev=213117&view=rev
Log:
Fix comment in InstCombiner::visitAddrSpaceCast.

In the original version of the patch the behaviour was like described in
the comment.  This behaviour was changed before committing it without
updating the comment.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=213117&r1=213116&r2=213117&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Tue Jul 15 20:34:21 2014
@@ -1909,9 +1909,9 @@ Instruction *InstCombiner::visitBitCast(
 }
 
 Instruction *InstCombiner::visitAddrSpaceCast(AddrSpaceCastInst &CI) {
-  // If the destination pointer element type is not the the same as the source's
-  // do the addrspacecast to the same type, and then the bitcast in the new
-  // address space. This allows the cast to be exposed to other transforms.
+  // If the destination pointer element type is not the same as the source's
+  // first do a bitcast to the destination type, and then the addrspacecast.
+  // This allows the cast to be exposed to other transforms.
   Value *Src = CI.getOperand(0);
   PointerType *SrcTy = cast<PointerType>(Src->getType()->getScalarType());
   PointerType *DestTy = cast<PointerType>(CI.getType()->getScalarType());





More information about the llvm-commits mailing list