Bug 67103 - [6 Regression]: gcc.target/i386/cmov2.c and gcc.target/i386/cmov3.c FAIL on x86
Summary: [6 Regression]: gcc.target/i386/cmov2.c and gcc.target/i386/cmov3.c FAIL on x86
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 6.0
: P3 normal
Target Milestone: 6.0
Assignee: ktkachov
URL:
Keywords:
Depends on:
Blocks: 67126
  Show dependency treegraph
 
Reported: 2015-08-03 17:36 UTC by Uroš Bizjak
Modified: 2015-08-13 09:13 UTC (History)
1 user (show)

See Also:
Host:
Target: x86
Build:
Known to work:
Known to fail: 6.0
Last reconfirmed: 2015-08-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uroš Bizjak 2015-08-03 17:36:10 UTC
Revision r226491 :

[RTL-ifcvt] Improve conditional select ops on immediates

	* ifcvt.c (noce_try_store_flag_constants): Make logic of the case
	when diff == STORE_FLAG_VALUE or diff == -STORE_FLAG_VALUE more
	explicit.  Prefer to add the flag whenever possible.
	(noce_process_if_block): Try noce_try_store_flag_constants before
	noce_try_cmove.

	* gcc.target/aarch64/csel_bfx_1.c: New test.
	* gcc.target/aarch64/csel_imms_inc_1.c: Likewise.

introduced following testsuite failures on x86:

FAIL: gcc.target/i386/cmov2.c scan-assembler sbb
FAIL: gcc.target/i386/cmov3.c scan-assembler cmov[^3]

The report and a discussion is at [1].

[1] https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00056.html
Comment 1 ktkachov 2015-08-03 17:38:39 UTC
Mine.
Comment 2 ktkachov 2015-08-13 09:11:45 UTC
Author: ktkachov
Date: Thu Aug 13 09:11:13 2015
New Revision: 226853

URL: https://gcc.gnu.org/viewcvs?rev=226853&root=gcc&view=rev
Log:
[RTL-ifcvt] Improve conditional select ops on immediates (fix failing x86_64 cmov tests)

	PR rtl-optimization/67103
	* ifcvt.c (noce_try_store_flag_constants): Move
	x = (-(test != 0) & (b - a)) + a transformation to...
	(noce_try_cmove): ... Here.  Try it if normal conditional
	move fails.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ifcvt.c
Comment 3 ktkachov 2015-08-13 09:13:16 UTC
Fixed.