Skip to content
Commit e48237df authored by David Majnemer's avatar David Majnemer
Browse files

DAGCombiner: fold (xor (shl 1, x), -1) -> (rotl ~1, x)

Targets which provide a rotate make it possible to replace a sequence of
(XOR (SHL 1, x), -1) with (ROTL ~1, x).  This saves an instruction on
architectures like X86 and POWER(64).

Differential Revision: http://reviews.llvm.org/D8350

llvm-svn: 232572
parent 8fa8c384
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment