freebsd-skq/contrib
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
..
amd Merge ^/head r277861 through r277895. 2015-01-29 19:21:21 +00:00
apr Update apr-1.5.1 to 1.5.2 2015-08-09 05:14:25 +00:00
apr-util
atf Import proposed fix from upstream for 2015-05-21 05:06:08 +00:00
binutils In binutils' arm-dis.c, avoid left-shifting a negative number. 2015-09-22 09:35:35 +00:00
bmake Update meta2deps example after i386-elf to i386 rename 2015-07-02 14:44:30 +00:00
bsnmp Fix variable 'old' is used uninitialized whenever '&&' condition is false. 2015-08-07 06:15:01 +00:00
byacc
bzip2
com_err
compiler-rt Merge ^/head r288197 through r288456. 2015-10-01 19:02:45 +00:00
dialog
diff Fix the wrong format, format specifies type 'int' but the argument has type 2015-06-01 06:14:17 +00:00
dma Fix build with gcc 4.2 2015-10-11 17:45:20 +00:00
dtc Silence clang warning about extraneous parenthesis 2015-06-05 17:18:10 +00:00
ee Fix minor syntax and grammar errors in the markup of the ee(1) man page 2015-01-18 17:25:41 +00:00
elftoolchain Add missing commas 2015-10-12 15:35:34 +00:00
expat Fix multiple integer overflows in expat. 2015-08-18 19:30:04 +00:00
file MFV r288140: update file to 5.25. 2015-09-23 05:39:20 +00:00
flex
gcc Revert r289150: 2015-10-12 02:05:25 +00:00
gcclibs In gcc's libcpp, stop using the INTTYPE_MAXIMUM() macro, which relies on 2015-08-12 20:16:13 +00:00
gdb Update intree gdb/kgdb to handle 2 dwarf types: 2015-05-17 15:49:38 +00:00
gdtoa
gperf Convert texinfo to mdoc(7) using texi2mdoc 2015-03-02 11:48:00 +00:00
groff Significant upgrades to sa(4) and mt(1). 2015-02-23 21:59:30 +00:00
hyperv/tools Appease gcc-4.2 2015-08-20 21:49:59 +00:00
ipfilter ipf(1): Use strchr(3) instead of deprecated index(3) 2015-05-22 18:31:26 +00:00
jemalloc Update jemalloc to 4.0.2. 2015-09-22 03:02:18 +00:00
ldns Add a script that runs configure for both ldns and drill. 2015-04-27 12:02:16 +00:00
ldns-host
less
libarchive MFV r285970: 2015-07-28 18:41:28 +00:00
libbegemot
libc-pwcache
libc-vis
libc++ Pull in r242623 from upstream libc++ trunk (by Eric Fiselier): 2015-10-09 21:04:28 +00:00
libcxxrt Add std::uncaught_exceptions() to libcxxrt (C++17, see N4152 and N4259). 2015-10-05 17:47:23 +00:00
libexecinfo
libgnuregex
libpcap
libreadline
libstdc++
libucl Update libucl to git version 8d3b186 2015-03-02 21:41:09 +00:00
libxo Fix build for architectures that define wchar_t as an unsigned int. 2015-08-24 17:58:11 +00:00
llvm Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio): 2015-10-13 16:24:22 +00:00
mdocml Replace the gunzip(1) system by a minimalistic zlib based implementation. 2015-06-03 13:32:28 +00:00
mknod
mtree
ncurses Make ncurses build with GCC 5.0 and up 2015-08-27 14:00:20 +00:00
netbsd-tests Pass 8 arguments to makecontext on arm64 as this is all we support. 2015-10-01 09:53:12 +00:00
netcat MFV r288243: nc from OpenBSD 5.8. 2015-09-27 07:04:16 +00:00
ngatm
ntp MFV ntp-4.2.8p3 (r284990). 2015-07-05 15:42:16 +00:00
nvi Update nvi to 2.1.3 which fixes the data corruption when locale conversion 2015-04-10 17:50:28 +00:00
ofed Define BINDIR for some test utilities. 2015-03-19 15:55:02 +00:00
one-true-awk
openbsm
openpam Restore the upstream (and documented) behavior of searching for modules 2015-09-21 17:26:35 +00:00
openresolv MFV r225523, r282431: 2015-05-04 21:07:20 +00:00
opie
pam_modules/pam_passwdqc
pf Fix a couple of missing lines that obscured the -p description. 2015-06-28 20:53:36 +00:00
pjdfstest Fix race when testing for ETXTBSY writing to ${n0} (process image) by making 2015-04-16 03:35:47 +00:00
pnpinfo
sendmail Reminder to check tools/build/mk/OptionalObsoleteFiles.inc on new 2015-08-07 04:58:35 +00:00
serf Update serf from 1.3.7 to 1.3.8. Mostly disables sslv2 and sslv3. 2015-08-09 05:16:14 +00:00
smbfs Remove the const qualifier from iconv(3) to comply with POSIX: 2015-04-15 09:09:20 +00:00
sqlite3 Update the private sqlite3 from 3.8.9 to 3.8.11.1 (used by svnlite and 2015-08-09 05:44:57 +00:00
subversion Update from svn-1.8.14 to 1.9.2. 2015-10-12 09:53:55 +00:00
tcp_wrappers
tcpdump MFV r285292: 2015-07-08 23:57:58 +00:00
tcsh
telnet
tnftp
top Move contrib/top/top.X to contrib/top/top.xs and move 2015-06-08 19:45:24 +00:00
traceroute The code starts with base + 1 as the first port. Fix to documentation 2015-05-31 12:18:30 +00:00
tzcode Merge: 2015-10-08 11:42:15 +00:00
tzdata MFV r287019: leapseconds from tzdata2015f. 2015-08-22 07:40:51 +00:00
unbound Upgrade to Unbound 1.5.5. 2015-10-09 11:46:27 +00:00
unvis
vis
wpa Merge wpa_supplicant/hostapd 2.4. 2015-04-21 01:45:11 +00:00
xz MFV r281278: 2015-04-09 18:03:27 +00:00