This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/53190] New: CSE (?) CSEs asms
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 May 2012 12:46:48 +0000
- Subject: [Bug rtl-optimization/53190] New: CSE (?) CSEs asms
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53190
Bug #: 53190
Summary: CSE (?) CSEs asms
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
For the attached testcase CSE ends up CSEing
(insn 2556 2555 2557 128 (parallel [
(set (reg:DI 542 [ __res ])
(asm_operands:DI ("cvtss2si %1, %0") ("=r") 0 [
(reg:SF 543)
]
[
(asm_input:SF ("xm") (null):0)
]
[] /home/aj/build/glibc/testing/math/libm-test.c:8699))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
]) ../sysdeps/x86_64/fpu/bits/mathinline.h:82 -1
(nil))
(insn 2557 2556 2558 128 (set (reg/v:DI 403 [ __res ])
(reg:DI 542 [ __res ])) ../sysdeps/x86_64/fpu/bits/mathinline.h:82 62
{*movdi_internal_rex64}
(nil))
to
(insn 2556 2555 2557 128 (set (reg:DI 542 [ __res ])
(reg:DI 525 [ __res ])) ../sysdeps/x86_64/fpu/bits/mathinline.h:82 62
{*movdi_internal_rex64}
(nil))
(insn 2557 2556 2558 128 (set (reg/v:DI 403 [ __res ])
(reg:DI 525 [ __res ])) ../sysdeps/x86_64/fpu/bits/mathinline.h:82 62
{*movdi_internal_rex64}
(nil))
where reg:DI 525 is computed from an asm() in a different floating-point
status area:
(insn 2479 2478 2480 127 (parallel [
(set (reg:DI 525 [ __res ])
(asm_operands:DI ("cvtss2si %1, %0") ("=r") 0 [
(reg:SF 526)
]
[
(asm_input:SF ("xm") (null):0)
]
[] /home/aj/build/glibc/testing/math/libm-test.c:8699))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
]) ../sysdeps/x86_64/fpu/bits/mathinline.h:82 -1
(nil))
(insn 2480 2479 2481 127 (set (reg/v:DI 391 [ __res ])
(reg:DI 525 [ __res ])) ../sysdeps/x86_64/fpu/bits/mathinline.h:82 62
{*movdi_internal_rex64}
(nil))
the bug is sensitive to inlinign decisions and -fno-ipa-sra manages to
hide it.
Compile flags for the above is
-std=gnu99 -fgnu89-inline -O2 -fmerge-all-constants -fno-builtin
adding -frounding-math does not change anything, even if techincalli required.