condition flags USE in AD instruct
Christian Thalinger
Christian.Thalinger at Sun.COM
Tue Apr 14 13:34:26 PDT 2009
On Tue, 2009-04-14 at 12:42 -0700, Tom Rodriguez wrote:
> Matching Bools and Cmps is kind of special. All Ifs start out looking
> like (If (Bool (Cmp)) but before matching they are converted to (If
> (Bool (Cmp)) (Cmp)) so that they Bool and Cmp can be matched
> together. The reason for this is that C2 separates the comparison
> operation from the interpretation of those results.
I see, thanks.
> I don't know the
> full history of this but I assume it's to encourage GVN on the
> compares which collects together code that compares the same values
> but asks different questions about them. So if you want to use the
> result of a compare in an AddcI I think you need to use that same
> logic. In particular you need to modify Matcher::find_shared to do
> some variation of the Alt_Post_Visit logic on your AddcI to add an
> input for the Cmp and shove it into a BinaryNode so you can match
> using (Set dst (AddcI (Binary cop cr) (Binary dst src))).
I already did something like that, but I only add one BinaryNode. I
will add the second one and see if it works.
-- Christian
More information about the hotspot-compiler-dev
mailing list