This is an archive of the discontinued LLVM Phabricator instance.

R600/SI: Set HasMultipleConditionRegisters
ClosedPublic

Authored by arsenm on Apr 30 2015, 3:01 PM.

Details

Reviewers
arsenm
Summary

This is true if we are using vector conditions. For now,
we are always doing this. Until there is a useful way of
getting uniformity information at this point and we attempt
to use scalar compares, it is better to assume that we can
use any SGPR pair for conditions.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 24773.Apr 30 2015, 3:01 PM
arsenm retitled this revision from to R600/SI: Set HasMultipleConditionRegisters .
arsenm updated this object.
arsenm edited the test plan for this revision. (Show Details)
arsenm added a subscriber: Unknown Object (MLST).

The shader-db shows this is a slight improvement overall. However, I did find a regression case:

define void @test(float addrspace(1)* %out) {
entry:
  br i1 undef, label %IF0, label %ENDIF

IF0:                                              ; preds = %entry
  %cmp1 = fcmp oeq float undef, 0.000000e+00
  br i1 %cmp1, label %IF1, label %ENDIF

IF1:                                              ; preds = %IF0
  %cmp2 = xor i1 %cmp1, true
  br label %ENDIF

ENDIF:                                            ; preds = %IF1, %IF0, %entry
  %tmp0 = phi i1 [ true, %entry ], [ %cmp2, %IF1 ], [ false, %IF0 ]
  %tmp2 = select i1 %tmp0, float undef, float 0.000000e+00
  store float %tmp2, float addrspace(1)* %out
  ret void
}
nhaehnle added a subscriber: nhaehnle.

FWIW, I don't see a regression with this example any more.

arsenm accepted this revision.Jan 10 2017, 11:19 AM
arsenm added a reviewer: arsenm.

This was enabled a while ago. Test + comment committed in r291586

This revision is now accepted and ready to land.Jan 10 2017, 11:19 AM
arsenm closed this revision.Jan 10 2017, 11:19 AM