[llvm] r342839 - [X86] Move RORX instructions back to WriteShift schedule class
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 23 09:17:13 PDT 2018
Author: rksimon
Date: Sun Sep 23 09:17:13 2018
New Revision: 342839
URL: http://llvm.org/viewvc/llvm-project?rev=342839&view=rev
Log:
[X86] Move RORX instructions back to WriteShift schedule class
Despite being rotates, these more modern instructions avoid many of the quirks of the regular x86 rotate instructions and consistently have a schedule closer to shifts.
Modified:
llvm/trunk/lib/Target/X86/X86InstrShiftRotate.td
Modified: llvm/trunk/lib/Target/X86/X86InstrShiftRotate.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrShiftRotate.td?rev=342839&r1=342838&r2=342839&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrShiftRotate.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrShiftRotate.td Sun Sep 23 09:17:13 2018
@@ -822,16 +822,18 @@ def ROT64L2R_imm8 : SDNodeXForm<imm, [{
return getI8Imm(64 - N->getZExtValue(), SDLoc(N));
}]>;
+// NOTE: We use WriteShift for these rotates as they avoid the stalls
+// of many of the older x86 rotate instructions.
multiclass bmi_rotate<string asm, RegisterClass RC, X86MemOperand x86memop> {
let hasSideEffects = 0 in {
def ri : Ii8<0xF0, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, u8imm:$src2),
!strconcat(asm, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
- []>, TAXD, VEX, Sched<[WriteRotate]>;
+ []>, TAXD, VEX, Sched<[WriteShift]>;
let mayLoad = 1 in
def mi : Ii8<0xF0, MRMSrcMem, (outs RC:$dst),
(ins x86memop:$src1, u8imm:$src2),
!strconcat(asm, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
- []>, TAXD, VEX, Sched<[WriteRotateLd]>;
+ []>, TAXD, VEX, Sched<[WriteShiftLd]>;
}
}
More information about the llvm-commits
mailing list