[PATCH] Select elimination pass
ghoflehner at apple.com
Tue Sep 2 12:46:05 PDT 2014
In special cases select instructions can be eliminated by
replacing them with a cheaper bitwise operation. The instance implemented
by this pass is %x=icmp.eq; %y=select %x,%r, null; %z=icmp.eq %y, null;
br %z,true, false ==> %x=icmp.ne; %y=icmp.eq %r,null; %z=or %x,%y; br
%z,true,false. The optimization is global and performed only when all uses
of the select result can be replaced by the select true value. For this
dominator information is used.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14608 bytes
Desc: not available
More information about the llvm-commits