[PATCH] D13161: [PATCH, PR24373] Combine shifts for x86
Evgeny Stupachenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 08:16:49 PDT 2015
evstupac added a comment.
> I do wonder if this could be beneficial for other targets - possibly moving this to DAGCombiner and using a a test against isExtFree() or similar?
That could be, however that is not obvious. I know that for Arm shifts could go in addition to the logic instructions. That they it could be better to leave shifts. Anyway keeping IR target independent is better. Note that at some point IR expand sext to pair of shifts (this, I think, simplify IR for further optimizations):
InstCombineCasts.cpp, visitSExt function// We need to emit a shl + ashr to do the sign extend.
> Also, please can you add tests against the load-execute versions movs*?
Do you mean segment moves? If so there are no sar/shl pair that could be folded to such mov.
Repository:
rL LLVM
http://reviews.llvm.org/D13161
More information about the llvm-commits
mailing list