Mesa (main): nir/opt_load_store_vectorize: fix broken indentation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 13 23:39:26 UTC 2022


Module: Mesa
Branch: main
Commit: dc835626b36efc45b6ff9e9e8c4c6f15d726b155
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc835626b36efc45b6ff9e9e8c4c6f15d726b155

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Thu Nov 11 16:07:20 2021 +0000

nir/opt_load_store_vectorize: fix broken indentation

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13778>

---

 src/compiler/nir/nir_opt_load_store_vectorize.c | 42 ++++++++++++-------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/compiler/nir/nir_opt_load_store_vectorize.c b/src/compiler/nir/nir_opt_load_store_vectorize.c
index cd5dbfbe40a..b2e0e5bebba 100644
--- a/src/compiler/nir/nir_opt_load_store_vectorize.c
+++ b/src/compiler/nir/nir_opt_load_store_vectorize.c
@@ -1191,36 +1191,36 @@ static bool
 vectorize_sorted_entries(struct vectorize_ctx *ctx, nir_function_impl *impl,
                          struct util_dynarray *arr)
 {
-      unsigned num_entries = util_dynarray_num_elements(arr, struct entry *);
+   unsigned num_entries = util_dynarray_num_elements(arr, struct entry *);
 
    bool progress = false;
-      for (unsigned first_idx = 0; first_idx < num_entries; first_idx++) {
-         struct entry *low = *util_dynarray_element(arr, struct entry *, first_idx);
-         if (!low)
-            continue;
+   for (unsigned first_idx = 0; first_idx < num_entries; first_idx++) {
+      struct entry *low = *util_dynarray_element(arr, struct entry *, first_idx);
+      if (!low)
+         continue;
 
-         for (unsigned second_idx = first_idx + 1; second_idx < num_entries; second_idx++) {
-            struct entry *high = *util_dynarray_element(arr, struct entry *, second_idx);
-            if (!high)
-               continue;
+      for (unsigned second_idx = first_idx + 1; second_idx < num_entries; second_idx++) {
+         struct entry *high = *util_dynarray_element(arr, struct entry *, second_idx);
+         if (!high)
+            continue;
 
-            uint64_t diff = high->offset_signed - low->offset_signed;
-            if (diff > get_bit_size(low) / 8u * low->intrin->num_components)
-               break;
+         uint64_t diff = high->offset_signed - low->offset_signed;
+         if (diff > get_bit_size(low) / 8u * low->intrin->num_components)
+            break;
 
-            struct entry *first = low->index < high->index ? low : high;
-            struct entry *second = low->index < high->index ? high : low;
+         struct entry *first = low->index < high->index ? low : high;
+         struct entry *second = low->index < high->index ? high : low;
 
-            if (try_vectorize(impl, ctx, low, high, first, second)) {
-               low = low->is_store ? second : first;
-               *util_dynarray_element(arr, struct entry *, second_idx) = NULL;
-               progress = true;
-            }
+         if (try_vectorize(impl, ctx, low, high, first, second)) {
+            low = low->is_store ? second : first;
+            *util_dynarray_element(arr, struct entry *, second_idx) = NULL;
+            progress = true;
          }
-
-         *util_dynarray_element(arr, struct entry *, first_idx) = low;
       }
 
+      *util_dynarray_element(arr, struct entry *, first_idx) = low;
+   }
+
    return progress;
 }
 



More information about the mesa-commit mailing list