mesa/src/intel/compiler/brw/test_opt_cse.cpp
Kenneth Graunke 73cbb35442
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
brw: Move into a new src/intel/compiler/brw subdirectory
This keeps the directory structure a bit more organized:
- brw specific code
- elk specific code
- common NIR passes that could be used in both places

It also means that you can now 'git grep' in the brw directory without
finding a bunch of elk code, or having to "grep thing b*".

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37755>
2025-10-09 07:01:47 +00:00

29 lines
707 B
C++

/*
* Copyright 2024 Intel Corporation
* SPDX-License-Identifier: MIT
*/
#include "test_helpers.h"
#include "brw_builder.h"
class cse_test : public brw_shader_pass_test {};
TEST_F(cse_test, add3_invalid)
{
set_gfx_verx10(125);
brw_builder bld = make_shader(MESA_SHADER_FRAGMENT, 16);
brw_reg dst0 = bld.null_reg_d();
brw_reg src0 = bld.vgrf(BRW_TYPE_D);
brw_reg src1 = bld.vgrf(BRW_TYPE_D);
brw_reg src2 = bld.vgrf(BRW_TYPE_D);
brw_reg src3 = bld.vgrf(BRW_TYPE_D);
bld.ADD3(dst0, src0, src1, src2)
->conditional_mod = BRW_CONDITIONAL_NZ;
bld.ADD3(dst0, src0, src1, src3)
->conditional_mod = BRW_CONDITIONAL_NZ;
EXPECT_NO_PROGRESS(brw_opt_cse_defs, bld);
}