This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65871] bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag
- From: "jamrial at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Jun 2015 23:20:07 +0000
- Subject: [Bug target/65871] bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag
- Auto-submitted: auto-generated
- References: <bug-65871-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65871
--- Comment #9 from James Almer <jamrial at gmail dot com> ---
Created attachment 35804
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35804&action=edit
Preprocessed code where a test instruction is still generated
Please look at the attachment.
[jamrial@archVM ~]$ gcc -std=c99 -march=haswell -O3 -c hevc_ps.i
[jamrial@archVM ~]$ objdump --disassemble hevc_ps.o | grep -B2 -A2 bzhi
5854: c4 62 22 f7 d6 sarx %r11d,%esi,%r10d
5859: c4 62 22 f7 da sarx %r11d,%edx,%r11d
585e: c4 e2 70 f5 f6 bzhi %ecx,%esi,%esi
5863: 45 89 9e 68 33 00 00 mov %r11d,0x3368(%r14)
586a: 41 89 c3 mov %eax,%r11d
--
589d: 85 f6 test %esi,%esi
589f: 75 0d jne 58ae
<ff_hevc_decode_nal_sps+0x1a6e>
58a1: c4 e2 70 f5 d2 bzhi %ecx,%edx,%edx
58a6: 85 d2 test %edx,%edx
58a8: 0f 84 5a 03 00 00 je 5c08
<ff_hevc_decode_nal_sps+0x1dc8>
[jamrial@archVM ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/jamrial/gcc-svn/configure --prefix=/usr/local
--libdir=/usr/local/lib --libexecdir=/usr/local/lib
--mandir=/usr/local/share/man --infodir=/usr/local/share/info
--enable-languages=c,c++,lto --enable-shared --disable-bootstrap
--enable-threads=posix --enable-libmpx --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-lto --enable-plugin --enable-install-libiberty
--with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib
--disable-werror
Thread model: posix
gcc version 6.0.0 20150618 (experimental) (GCC)
Not sure why the new model is not working here.