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

Devang Patel dpatel at apple.com
Fri Apr 29 15:00:32 PDT 2011


On Apr 29, 2011, at 2:50 PM, Benjamin Kramer wrote:

> 
> 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).

I added line 1592 however I am not sure that this particular transformation is covered by 1592 in all cases. I have seen "shl" without DebugLoc generated by instcombine before your patch landed in svn. If you're interested I can send you more info.

-
Devang






More information about the llvm-commits mailing list