626dbe195a
SkVM should be able to optimize away these equivalent expressions: (intA & intB) <-> (intB & intA) (intA ^ intB) <-> (intB ^ intA) (intA | intB) <-> (intB | intA) (intA + intB) <-> (intB + intA) (intA * intB) <-> (intB * intA) (intA == intB) <-> (intB == intA) (intA != intB) <-> (intB != intA) These should be guaranteed by IEEE754 as well: (floatA + floatB) <-> (floatB + floatA) (floatA * floatB) <-> (floatB * floatA) I've added a test to demonstrate existing behavior, which leaves these optimizations on the table. Change-Id: I01ce1d6f1cfadb3d77db405a83752c9dd52c99bd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/473238 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> |
||
---|---|---|
.. | ||
AllowNarrowingConversions.skvm | ||
AllowNarrowingConversions.stage | ||
ArrayIndexing.skvm | ||
ArrayIndexing.stage | ||
ArrayNarrowingConversions.skvm | ||
ArrayNarrowingConversions.stage | ||
Blend.skvm | ||
Blend.stage | ||
Commutative.skvm | ||
Commutative.stage | ||
ConstPreservation.skvm | ||
ConstPreservation.stage | ||
ConversionConstructors.skvm | ||
ConversionConstructors.stage | ||
GlobalVariables.skvm | ||
GlobalVariables.stage | ||
GLSLTypeNames.skvm | ||
GLSLTypeNames.stage | ||
LargeProgram_BlocklessLoops.skvm | ||
LargeProgram_BlocklessLoops.stage | ||
LargeProgram_FlatLoop.skvm | ||
LargeProgram_FlatLoop.stage | ||
LargeProgram_Functions.skvm | ||
LargeProgram_Functions.stage | ||
LargeProgram_NestedLoops.skvm | ||
LargeProgram_NestedLoops.stage | ||
LargeProgram_SplitLoops.skvm | ||
LargeProgram_SplitLoops.stage | ||
LargeProgram_StackDepth.skvm | ||
LargeProgram_StackDepth.stage | ||
LargeProgram_ZeroIterFor.skvm | ||
LargeProgram_ZeroIterFor.stage | ||
LoopFloat.skvm | ||
LoopFloat.stage | ||
LoopInt.skvm | ||
LoopInt.stage | ||
PrecisionQualifiers.skvm | ||
PrecisionQualifiers.stage | ||
QualifierOrder.skvm | ||
QualifierOrder.stage | ||
SampleWithExplicitCoord.skvm | ||
SampleWithExplicitCoord.stage | ||
Switch.skvm | ||
Switch.stage | ||
SwitchDefaultOnly.skvm | ||
SwitchDefaultOnly.stage | ||
SwitchWithFallthrough.skvm | ||
SwitchWithFallthrough.stage | ||
SwitchWithLoops.skvm | ||
SwitchWithLoops.stage | ||
VectorIndexing.skvm | ||
VectorIndexing.stage |