[PATCH] DAGCombiner: fold (xor (shl 1, x), -1) -> (rotl -2, x)
Nadav Rotem
nrotem at apple.com
Sun Mar 15 22:56:23 PDT 2015
David, the code and test case look great. The transformation is not trivial. Do you mind adding a line of comment that explains why -2 is used? Maybe an example input like 00000001 -> 11111101. Also a comment about how rotate can only pull in 1s and how large x values are undefined.
http://reviews.llvm.org/D8350
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list