Bug 35803 - still can't get rid of phony compare patterns - cbranch* / cstore* patterns miss their goal
Summary: still can't get rid of phony compare patterns - cbranch* / cstore* patterns m...
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2008-04-02 15:36 UTC by Jorn Wolfgang Rennecke
Modified: 2008-04-02 15:36 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2008-04-02 15:36:35 UTC
Gcc has traditionally used the concept of a compare operation that stores
a comparison result in CC0 or a register, and then can be used with arbitrary
comparison operators to compare it against zero to make a decision for
a branch, store flag, or conditional move instruction.
Since often the actual comparison instructions work differently, a number of
ports need to stash away the comparison operands when they pretend to emit
a comparison, and then emit the actual comparison later when its result is
cbranch* / cstore* patterns had the promise to get rid of this bogosity,
however, they are still don;t deliver.
The only way to have a conditional move is to first perform a comparison, and
then have the the actual move depende on the comparison result.  Thus, if
the architecture has conditional move, a comparison patterns are needed, even
if the targets compare operations are ill-matched, compare patterns have to be
defined, thus disabling cbranch* / cstore* patterns.