[llvm-commits] [llvm] r130485 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineShifts.cpp test/Transforms/InstCombine/shift.ll

Benjamin Kramer benny.kra at googlemail.com
Fri Apr 29 14:50:52 PDT 2011


On 29.04.2011, at 23:35, Devang Patel wrote:

> Benjamin,
> 
> On Apr 29, 2011, at 1:15 AM, Benjamin Kramer wrote:
> 
>> Author: d0k
>> Date: Fri Apr 29 03:15:41 2011
>> New Revision: 130485
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=130485&view=rev
>> Log:
>> InstCombine: turn (C1 << A) << C2) into (C1 << C2) << A)
> 
> Please set DebugLoc on new Shl, based on A's DebugLoc.
> 
> I'm not picking on you. I just started paying attention to this instcombiner issue. I know, there are many of places in instcombiner where we create new instructions without debug location. If you or anyone else has better approach we can use to preserve DebugLoc in instcombiner, I'd like to know!

Are you sure this specific transformation destroys the DebugLoc? When InstCombine simply replaces one
instruction with another it preserves debug information (InstructionCombining.cpp:1592).



More information about the llvm-commits mailing list