mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 02:10:37 +02:00
agx: unit test split uniform opt
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963>
This commit is contained in:
parent
ab7fb3d400
commit
5948e7ec2e
1 changed files with 18 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "agx_builder.h"
|
||||
#include "agx_test.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
|
@ -172,6 +173,23 @@ TEST_F(Optimizer, IntCopyprop)
|
|||
CASE32(agx_xor_to(b, out, agx_mov(b, wx), wy), agx_xor_to(b, out, wx, wy));
|
||||
}
|
||||
|
||||
TEST_F(Optimizer, CopypropSplitMovedUniform64)
|
||||
{
|
||||
CASE32(
|
||||
{
|
||||
/* emit_load_preamble puts in the move, so we do too */
|
||||
agx_index mov = agx_mov(b, agx_uniform(40, AGX_SIZE_64));
|
||||
agx_instr *spl = agx_split(b, 2, mov);
|
||||
spl->dest[0] = agx_temp(b->shader, AGX_SIZE_32);
|
||||
spl->dest[1] = agx_temp(b->shader, AGX_SIZE_32);
|
||||
agx_xor_to(b, out, spl->dest[0], spl->dest[1]);
|
||||
},
|
||||
{
|
||||
agx_xor_to(b, out, agx_uniform(40, AGX_SIZE_32),
|
||||
agx_uniform(42, AGX_SIZE_32));
|
||||
});
|
||||
}
|
||||
|
||||
TEST_F(Optimizer, IntCopypropDoesntConvert)
|
||||
{
|
||||
NEGCASE32({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue