llvm-6502/lib/Transforms/InstCombine
Chris Lattner 1add46ddfa Carve out a place in instcombine to put transformations which work knowing that their
result is non-zero.  Implement an example optimization (PR9814), which allows us to
transform:
  A / ((1 << B) >>u 2)
into:
  A >>u (B-2)

which we compile into:

_divu3:                                 ## @divu3
	leal	-2(%rsi), %ecx
	shrl	%cl, %edi
	movl	%edi, %eax
	ret

instead of:

_divu3:                                 ## @divu3
	movb	%sil, %cl
	movl	$1, %esi
	shll	%cl, %esi
	shrl	$2, %esi
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%esi, %eax
	ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131860 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 18:18:41 +00:00
..
CMakeLists.txt Removed a bunch of unnecessary target_link_libraries. 2010-09-28 22:39:14 +00:00
InstCombine.h Make the demanded bits/elements optimizations preserve debug line information. 2011-05-19 01:20:42 +00:00
InstCombineAddSub.cpp add is always integer, thanks to Frits for noticing this. 2011-02-17 20:55:29 +00:00
InstCombineAndOrXor.cpp We require threse bits to be zero, too. 2011-04-28 21:38:51 +00:00
InstCombineCalls.cpp Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)" 2011-05-21 18:31:42 +00:00
InstCombineCasts.cpp More instcombine simplifications towards better debug locations. 2011-05-18 23:11:30 +00:00
InstCombineCompares.cpp More instcombine simplifications towards better debug locations. 2011-05-18 23:11:30 +00:00
InstCombineLoadStoreAlloca.cpp More instcombine cleanup, towards improving debug line info. 2011-05-18 23:58:37 +00:00
InstCombineMulDivRem.cpp Carve out a place in instcombine to put transformations which work knowing that their 2011-05-22 18:18:41 +00:00
InstCombinePHI.cpp Stop trying to have instcombine preserve LCSSA form: this was not 2011-04-27 10:55:12 +00:00
InstCombineSelect.cpp Switch more inst insertion in instcombine to IRBuilder. 2011-05-18 18:10:28 +00:00
InstCombineShifts.cpp Balance parentheses. 2011-04-29 08:41:23 +00:00
InstCombineSimplifyDemanded.cpp Revert r131664 and fix it in instcombine instead. rdar://9467055 2011-05-20 00:54:37 +00:00
InstCombineVectorOps.cpp Instcombile optimization: extractelement(cast) -> cast(extractelement) 2011-03-31 22:57:29 +00:00
InstCombineWorklist.h InstCombine: We know the number of items initially added to the worklist map, reserve space early to avoid rehashing. 2011-03-05 16:43:46 +00:00
InstructionCombining.cpp More instcombine cleanup, towards improving debug line info. 2011-05-18 23:58:37 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00