projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b259e7
)
nir/lower_io: Emit less iadd(x, 0)
author
Konstantin Seurer
<konstantin.seurer@gmail.com>
Sun, 7 May 2023 09:53:21 +0000
(11:53 +0200)
committer
Marge Bot
<emma+marge@anholt.net>
Wed, 10 May 2023 16:21:34 +0000
(16:21 +0000)
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22890>
src/compiler/nir/nir_lower_io.c
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_lower_io.c
b/src/compiler/nir/nir_lower_io.c
index
ec8b6bf
..
2838807
100644
(file)
--- a/
src/compiler/nir/nir_lower_io.c
+++ b/
src/compiler/nir/nir_lower_io.c
@@
-908,6
+908,9
@@
build_addr_iadd_imm(nir_builder *b, nir_ssa_def *addr,
nir_variable_mode modes,
int64_t offset)
{
+ if (!offset)
+ return addr;
+
return build_addr_iadd(b, addr, addr_format, modes,
nir_imm_intN_t(b, offset,
addr_get_offset_bit_size(addr, addr_format)));