[PATCH] D28219: [X86] Attempt to pre-truncate arithmetic operations if useful
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 01:00:14 PST 2017
delena added a comment.
One some targets pmulld is significantly slower than pmullw (FeatureSlowPMULLD). I assume that truncating even different (variable) inputs should be profitable in this case.
And your transformation may be profitable for this scenario:
trunc(binop (s/zext(x), s/zext(y)) when x and y are different variables.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:31795
+ const TargetLowering &TLI = DAG.getTargetLoweringInfo();
+ unsigned Opcode = Src.getOpcode();
+ EVT SrcVT = Src.getValueType();
----------------
Should you check hasOneUse() here ?
Repository:
rL LLVM
https://reviews.llvm.org/D28219
More information about the llvm-commits
mailing list