search for: shl2

Displaying 5 results from an estimated 5 matches for "shl2".

Did you mean: shl
2015 Feb 22
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
...(GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() && !Src.hasOneUse()) return false; return true; } I have a case where GEP: %arrayidx7 = getelementptr inbounds i32* %arrayidx, i32 %shl6 Src: %arrayidx = getelementptr inbounds [4096 x i32]* @phasor_4096, i32 0, i32 %shl2 GEP.hasAllZeroIndices() will return false and the merge will occur Why do we want to combine these 2 getelementptr? On my out of tree target, combining these 2 GetElementPtr create a performance regression because since GEP is in a loop (Src is out of loop), GEP will lower to a more complicated a...
2012 Apr 16
0
[LLVMdev] InstCombine adds bit masks, confuses self, others
On Tue, Apr 17, 2012 at 12:23 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote: > I am not sure how best to fix this. If possible, InstCombine's > canonicalization shouldn't hide arithmetic progressions behind bit masks. The entire concept of cleverly converting arithmetic to bit masks seems like the perfect domain for DAGCombine instead of InstCombine: 1) We know the
2015 Feb 24
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
...()) > > return false; > > return true; > > } > > > > > > > > I have a case where > > GEP: %arrayidx7 = getelementptr inbounds i32* %arrayidx, i32 %shl6 > > Src: %arrayidx = getelementptr inbounds [4096 x i32]* @phasor_4096, > > i32 0, i32 %shl2 > > > > > > GEP. hasAllZeroIndices() will return false and the merge will occur > > Why do we want to combine these 2 getelementptr? > > > > > > On my out of tree target, combining these 2 GetElementPtr create a > > performance regression because sinc...
2012 Apr 16
5
[LLVMdev] InstCombine adds bit masks, confuses self, others
Look at this silly function: $ cat small.c unsigned f(unsigned a, unsigned *p) { unsigned x = a/4; p[0] = x; p[1] = x+x; return p[1] - 2*p[0]; } GCC turns this into straightforward code and figures out the 0 return value: shrl $2, %edi movl %edi, (%rsi) addl %edi, %edi movl %edi, 4(%rsi) movl $0, %eax ret LLVM optimizes the code: $ clang -O -S -o- small.c -emit-llvm define i32
2015 Feb 25
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
...> > > > > > > > > > > I have a case where > > > GEP: %arrayidx7 = getelementptr inbounds i32* %arrayidx, i32 > > > %shl6 > > > Src: %arrayidx = getelementptr inbounds [4096 x i32]* > > > @phasor_4096, > > > i32 0, i32 %shl2 > > > > > > > > > GEP. hasAllZeroIndices() will return false and the merge will > > > occur > > > Why do we want to combine these 2 getelementptr? > > > > > > > > > On my out of tree target, combining these 2 GetElementPtr...