[Bug target/70322] New: STV doesn't optimize andn
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Mar 20 15:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70322
Bug ID: 70322
Summary: STV doesn't optimize andn
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: enkovich.gnu at gmail dot com
Target Milestone: ---
Target: i386
i386.md has
(define_insn_and_split "*andndi3_doubleword"
[(set (match_operand:DI 0 "register_operand" "=r,r")
(and:DI
(not:DI (match_operand:DI 1 "register_operand" "r,r"))
(match_operand:DI 2 "nonimmediate_operand" "r,m")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_BMI && !TARGET_64BIT && TARGET_STV && TARGET_SSE"
"#"
But it is never used:
[hjl@gnu-tools-1 bitwise-1]$ cat andn.i
extern long long z;
void
foo (long long x, long long y)
{
z = ~x & y;
}
[hjl@gnu-tools-1 bitwise-1]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -m32 -S andn.i
-fno-asynchronous-unwind-tables
[hjl@gnu-tools-1 bitwise-1]$ cat andn.s
.file "andn.i"
.text
.p2align 4,,15
.globl foo
.type foo, @function
foo:
movl 4(%esp), %ecx
notl %ecx
movl %ecx, %eax
movl 8(%esp), %ecx
andl 12(%esp), %eax
notl %ecx
movl %ecx, %edx
andl 16(%esp), %edx
movl %eax, z
movl %edx, z+4
ret
.size foo, .-foo
.ident "GCC: (GNU) 6.0.0 20160318 (experimental)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-tools-1 bitwise-1]$
More information about the Gcc-bugs
mailing list