[PATCH] D20310: Teach LLVM about Power 9 D-Form VSX Instructions
Thomas Jablin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 08:03:58 PDT 2016
tjablin updated this revision to Diff 60689.
tjablin added a comment.
Herald added a subscriber: qcolombet.
Another update from CY.
Changes:
Remove VSHRC, use existing VRRC instead, so we simplify register class hierarchy
Now, VSRC = (VSLRC, VRRC)
Because VSX can use vs0-vs63 or v0-v31, so we add a custom flag "UseVSXReg" to distinguish it, asm printer and PPCMCCodeEmitter will use that flag to print correct name and get correct encoding
Because VSRC = (VSLRC, VRRC), so backend is possible to spill/reload a vector register with incompatible vector store/load instruction, i.e. stxvd2x/lxv or stxv/lxvd2x, so we track stack slot to make sure we use correct store/load instruction.
Fix broken test cases because of this change.
select-i1-vs-i1.ll
Now we generate bettter code for all v4f32 test cases
vsx-p8.ll
vsx.ll
Now we generate better code when we use '-fast-isel -O0', because we don't need unnecessary register copy.
Testing:
Passed 3-stage bootstrap testing
Passed 3-stage llvm/clang check-all
Passed Spec2006 (binaries built by stage-3 clang/llvm) with:
(a) -m64 -mcpu=power8 -O3
(b) -m64 -mcpu=power8 -O1
http://reviews.llvm.org/D20310
Files:
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCCallingConv.td
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCInstrFormats.td
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.h
lib/Target/PowerPC/PPCInstrVSX.td
lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
lib/Target/PowerPC/PPCMachineFunctionInfo.h
lib/Target/PowerPC/PPCRegisterInfo.cpp
lib/Target/PowerPC/PPCRegisterInfo.td
lib/Target/PowerPC/PPCVSXCopy.cpp
test/CodeGen/PowerPC/dform-test.ll
test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll
test/CodeGen/PowerPC/select-i1-vs-i1.ll
test/CodeGen/PowerPC/vsx-args.ll
test/CodeGen/PowerPC/vsx-infl-copy1.ll
test/CodeGen/PowerPC/vsx-p8.ll
test/CodeGen/PowerPC/vsx-spill-norwstore.ll
test/CodeGen/PowerPC/vsx.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20310.60689.patch
Type: text/x-patch
Size: 68459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160614/a823dfa2/attachment-0001.bin>
More information about the llvm-commits
mailing list