From b4db99c76ab3b0eed1a90b142aa420960adb2ae4 Mon Sep 17 00:00:00 2001 From: Manuel Jacob Date: Wed, 16 Jul 2014 01:34:21 +0000 Subject: [PATCH] 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. llvm-svn: 213117 --- llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp index ff083d7..b9c3d0f 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -1909,9 +1909,9 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) { } 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(Src->getType()->getScalarType()); PointerType *DestTy = cast(CI.getType()->getScalarType()); -- 2.7.4