Support G_LSHR/G_ASHR/G_SHL. We have 3 variance for shift instructions : shift gpr, shift imm, shift 1.
Currently GlobalIsel TableGen generate patterns for shift imm and shift 1, but with shiftCount i8.
In G_LSHR/G_ASHR/G_SHL like LLVM-IR both arguments has the same type, so for now only shift i8 can use auto generated TableGen patterns.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 10562 Build 10562: arc lint + arc unit
Event Timeline
Comment Actions
LGTM with minor comments
| lib/Target/X86/X86InstructionSelector.cpp | ||
|---|---|---|
| 1303 | Can you please add a comment here explaining how shift by constant shift-amount are handled? | |
| 1319 | I don't think that NumTypes adds much here. You can just define OpTable[] = | |
| 1330 | another option would be to search to avoid the chauned if's. Maybe something like: find(OpTable, [DstTy] (const DhiftEntry& E) { return E.SizeInBits == DstTy.getSizeInBits(); }) | |
Can you please add a comment here explaining how shift by constant shift-amount are handled?