freebsd kernel with SKQ
Go to file
dim 7fba1b584d Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio):
[x86] Fix wrong lowering of vsetcc nodes (PR25080).

  Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
  assumption that for non-AVX512 targets, the source type and destination type
  of a type-legalized setcc node were always the same type.

  This assumption was unfortunately incorrect; the type legalizer is not always
  able to promote the return type of a setcc to the same type as the first
  operand of a setcc.

  In the case of a vsetcc node, the legalizer firstly checks if the first input
  operand has a legal type. If so, then it promotes the return type of the vsetcc
  to that same type. Otherwise, the return type is promoted to the 'next legal
  type', which, for vectors of MVT::i1 is always a 128-bit integer vector type.

  Example (-mattr=+avx):

    %0 = trunc <8 x i32> %a to <8 x i23>
    %1 = icmp eq <8 x i23> %0, zeroinitializer

  The initial selection dag for the code above is:

  v8i1 = setcc t5, t7, seteq:ch
    t5: v8i23 = truncate t2
      t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
      t7: v8i32 = build_vector of all zeroes.

  The type legalizer would firstly check if 't5' has a legal type. If so, then it
  would reuse that same type to promote the return type of the setcc node.
  Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to
  promote the return type of the setcc node. Consequently, the setcc return type
  is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the
  following dag node:
    v8i16 = setcc t32, t25, seteq:ch

    where t32 and t25 are now values of type v8i32.

  Before this patch, function LowerVSETCC would have wrongly expanded the setcc
  to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
  instruction. In our case, ISel would have matched a VPCMPEQWrr:
    t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25

  However, t36 and t25 are both VR256, while the result type is instead of class
  VR128. This inconsistency ended up causing the insertion of COPY instructions
  like this:
    %vreg7<def> = COPY %vreg3; VR128:%vreg7 VR256:%vreg3

  Which is an invalid full copy (not a sub register copy).
  Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy
  instruction" in the attempt to expand the malformed pseudo COPY instructions.

  This patch fixes the problem adding the missing logic in LowerVSETCC to handle
  the corner case of a setcc with 128-bit return type and 256-bit operand type.

  This problem was originally reported by Dimitry as PR25080. It has been latent
  for a very long time. I have added the minimal reproducible from that bugzilla
  as test setcc-lowering.ll.

  Differential Revision: http://reviews.llvm.org/D13660

This should fix the "Cannot emit physreg copy instruction" errors when
compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set
to a CPU supporting AVX (e.g. sandybridge, ivybridge).
2015-10-13 16:24:22 +00:00
bin Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
cddl Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
contrib Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio): 2015-10-13 16:24:22 +00:00
crypto Fix OpenSSH multiple vulnerabilities by backporting three changes 2015-08-25 20:48:37 +00:00
etc If world is built with a custom sendmail.cf, use it for the distribution 2015-10-12 21:02:36 +00:00
gnu Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
include Mute this cookie as well 2015-10-03 17:28:46 +00:00
kerberos5 Add more SUBDIR_PARALLEL. 2015-09-26 14:13:51 +00:00
lib Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to 2015-10-12 18:31:21 +00:00
libexec Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
release Use print as a function, not operator. 2015-10-08 03:28:15 +00:00
rescue META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
sbin casperd: bump default socket queue length to SOMAXCONN; make length configurable. 2015-10-13 02:34:41 +00:00
secure Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
share Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
sys Export bunch of state variables as sysctls. 2015-10-13 11:02:56 +00:00
targets All the games moved to usr.bin/ in r288485. 2015-10-02 17:58:16 +00:00
tests Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
tools Merge ^/head r288197 through r288456. 2015-10-01 19:02:45 +00:00
usr.bin Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to 2015-10-12 18:31:21 +00:00
usr.sbin makefs: introduce a new option to specify what to round the resulting 2015-10-13 02:32:15 +00:00
.arcconfig Add repository.callsign, to help arcanist figure out what repo it's 2015-07-02 22:23:52 +00:00
.arclint phabricator related changes: 2015-04-20 20:33:22 +00:00
COPYRIGHT Bump copyright year. 2014-12-31 10:00:43 +00:00
LOCKS
MAINTAINERS Remove cokane@ from MAINTAINERS for 3dfx(4)/tdfx(4) because their email 2014-11-25 05:25:12 +00:00
Makefile Add installconfig as a top level target 2015-10-09 22:14:07 +00:00
Makefile.inc1 Fix installing config files as non root 2015-10-10 14:43:46 +00:00
ObsoleteFiles.inc Update dates in UPDATING and ObsoleteFiles.inc. 2015-10-06 16:26:07 +00:00
README README: changes and fixups 2015-04-19 07:16:44 +00:00
UPDATING Rewrap UPDATING entry from r265422 to 80 columns 2015-10-13 12:51:44 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree.  See build(7)
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The `buildkernel` and `installkernel` targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process.  See build(7), config(8),
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
for more information.

Note: If you want to build and install the kernel with the
`buildkernel` and `installkernel` targets, you might need to build
world before.  More information is available in the handbook.

The kernel configuration files reside in the sys/<arch>/conf
sub-directory.  GENERIC is the default configuration used in release builds.
NOTES contains entries and documentation for all possible
devices, not just those commonly used.


Source Roadmap:
---------------

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html