Bug 39347 - Vector mode class for CCmode is missing
Summary: Vector mode class for CCmode is missing
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Jorn Wolfgang Rennecke
URL:
Keywords: patch
Depends on:
Blocks: 39346
  Show dependency treegraph
 
Reported: 2009-03-02 17:12 UTC by Jorn Wolfgang Rennecke
Modified: 2021-07-19 17:13 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-03-05 00:54:43


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2009-03-02 17:12:06 UTC
There is no mode class to describe a SIMD condition code register.
Comment 1 Andrew Pinski 2009-03-02 17:15:58 UTC
Is there a reason behind why you want this?  SIMD CC modes seems a bit weird
.
Comment 2 Jorn Wolfgang Rennecke 2009-03-02 18:16:19 UTC
(In reply to comment #1)
> Is there a reason behind why you want this?  SIMD CC modes seems a bit weird

The MXP architecture has a SIMD CC register that is pretty close to CC0.
I.e. some moves and adds can be done witout affecting this register, but
some simply can't.
Comment 3 Andrew Pinski 2009-03-02 18:19:44 UTC
I still don't understand what you mean by that.  Do you mean the registers are vector based and the instructions effect the conditional register and that conditional register has slots (elements) that correspond to the vector slots (elements)?   Still having a vector mode of CCmode seems weird.
Comment 4 Jorn Wolfgang Rennecke 2009-03-02 18:59:24 UTC
(In reply to comment #3)
> I still don't understand what you mean by that.  Do you mean the registers are
> vector based and the instructions effect the conditional register and that
> conditional register has slots (elements) that correspond to the vector slots
> (elements)?

Exactly.  The conditiona register is known as V8CCImode
for ordinary integer instructions, V8CCZNmode if only N/Z flags matter,
and V8CCZmode when only the Z falg is relevant.  You can copy it from/to
a general purpose vector register, in which case it looks like a V8PHImode
register with 6 valid bits per element.

There are also use cases where it acts as having 32 bit partial elements.

>  Still having a vector mode of CCmode seems weird.

Actually, it makes more sense than a scalar CCmode register.
The limited clock frequency is compensated for by higher throughput
per cycle.

Van Neumann would have said that having a processor with 4 or 5 different
types of physical memory (L1 Dcache, L1 Icache, L2 cache, maybe L3 cache,
main memory) seems weird.
Comment 5 Jorn Wolfgang Rennecke 2009-03-05 00:54:43 UTC
patch is here:
http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00259.html