Mesa (master): nir/constant_folding: Add an unreachable to a switch

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 26 16:45:59 UTC 2018


Module: Mesa
Branch: master
Commit: 6de1869e86dc54f531f6c5099aa5125acb06ee0f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6de1869e86dc54f531f6c5099aa5125acb06ee0f

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Thu Oct 18 22:26:03 2018 -0500

nir/constant_folding: Add an unreachable to a switch

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/compiler/nir/nir_opt_constant_folding.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compiler/nir/nir_opt_constant_folding.c b/src/compiler/nir/nir_opt_constant_folding.c
index e2920e6b3f..05b47d4c0f 100644
--- a/src/compiler/nir/nir_opt_constant_folding.c
+++ b/src/compiler/nir/nir_opt_constant_folding.c
@@ -89,6 +89,8 @@ constant_fold_alu_instr(nir_alu_instr *instr, void *mem_ctx)
          case 8:
             src[i].u8[j] = load_const->value.u8[instr->src[i].swizzle[j]];
             break;
+         default:
+            unreachable("Invalid bit size");
          }
       }
 




More information about the mesa-commit mailing list