diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 18:43:37 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 18:43:37 +0000 |
commit | 82ca21468e7fe6a5112961ba86434579bed3f204 (patch) | |
tree | c2772f1f62ff857fee7802d46eb79f45d45d6d54 /contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff | |
parent | 6148c19c738a92f344008aa3f88f4e008bada0ee (diff) | |
download | FreeBSD-src-82ca21468e7fe6a5112961ba86434579bed3f204.zip FreeBSD-src-82ca21468e7fe6a5112961ba86434579bed3f204.tar.gz |
Cleanup patch set, and update README.TXT. Add three new patches.
Diffstat (limited to 'contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff')
-rw-r--r-- | contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff b/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff deleted file mode 100644 index c507caf..0000000 --- a/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff +++ /dev/null @@ -1,67 +0,0 @@ -Pull in r200141 from upstream llvm trunk (by Jakob Stoklund Olesen): - - Clean up the Legal/Expand logic for SPARC popc. - -Introduced here: http://svnweb.freebsd.org/changeset/base/262261 - -Index: lib/Target/Sparc/SparcSubtarget.cpp -=================================================================== ---- lib/Target/Sparc/SparcSubtarget.cpp -+++ lib/Target/Sparc/SparcSubtarget.cpp -@@ -41,6 +41,10 @@ SparcSubtarget::SparcSubtarget(const std::string & - - // Parse features string. - ParseSubtargetFeatures(CPUName, FS); -+ -+ // Popc is a v9-only instruction. -+ if (!IsV9) -+ UsePopc = false; - } - - -Index: lib/Target/Sparc/SparcISelLowering.cpp -=================================================================== ---- lib/Target/Sparc/SparcISelLowering.cpp -+++ lib/Target/Sparc/SparcISelLowering.cpp -@@ -1461,8 +1461,8 @@ SparcTargetLowering::SparcTargetLowering(TargetMac - setOperationAction(ISD::BR_CC, MVT::i64, Custom); - setOperationAction(ISD::SELECT_CC, MVT::i64, Custom); - -- if (Subtarget->usePopc()) -- setOperationAction(ISD::CTPOP, MVT::i64, Legal); -+ setOperationAction(ISD::CTPOP, MVT::i64, -+ Subtarget->usePopc() ? Legal : Expand); - setOperationAction(ISD::CTTZ , MVT::i64, Expand); - setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i64, Expand); - setOperationAction(ISD::CTLZ , MVT::i64, Expand); -@@ -1518,7 +1518,6 @@ SparcTargetLowering::SparcTargetLowering(TargetMac - setOperationAction(ISD::FSINCOS, MVT::f32, Expand); - setOperationAction(ISD::FREM , MVT::f32, Expand); - setOperationAction(ISD::FMA , MVT::f32, Expand); -- setOperationAction(ISD::CTPOP, MVT::i32, Expand); - setOperationAction(ISD::CTTZ , MVT::i32, Expand); - setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i32, Expand); - setOperationAction(ISD::CTLZ , MVT::i32, Expand); -@@ -1568,8 +1567,8 @@ SparcTargetLowering::SparcTargetLowering(TargetMac - - setStackPointerRegisterToSaveRestore(SP::O6); - -- if (Subtarget->isV9() && Subtarget->usePopc()) -- setOperationAction(ISD::CTPOP, MVT::i32, Legal); -+ setOperationAction(ISD::CTPOP, MVT::i32, -+ Subtarget->usePopc() ? Legal : Expand); - - if (Subtarget->isV9() && Subtarget->hasHardQuad()) { - setOperationAction(ISD::LOAD, MVT::f128, Legal); -Index: test/CodeGen/SPARC/64bit.ll -=================================================================== ---- test/CodeGen/SPARC/64bit.ll -+++ test/CodeGen/SPARC/64bit.ll -@@ -1,5 +1,5 @@ --; RUN: llc < %s -march=sparcv9 -disable-sparc-delay-filler -disable-sparc-leaf-proc | FileCheck %s --; RUN: llc < %s -march=sparcv9 | FileCheck %s -check-prefix=OPT -+; RUN: llc < %s -march=sparcv9 -mattr=+popc -disable-sparc-delay-filler -disable-sparc-leaf-proc | FileCheck %s -+; RUN: llc < %s -march=sparcv9 -mattr=+popc | FileCheck %s -check-prefix=OPT - - ; CHECK-LABEL: ret2: - ; CHECK: or %g0, %i1, %i0 |