]> gcc.gnu.org Git - gcc.git/commitdiff
[BRIGFE] Fix handling of NOPs.
authorPekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
Fri, 4 May 2018 19:46:16 +0000 (19:46 +0000)
committerPekka Jääskeläinen <visit0r@gcc.gnu.org>
Fri, 4 May 2018 19:46:16 +0000 (19:46 +0000)
From-SVN: r259958

gcc/brig/ChangeLog
gcc/brig/brigfrontend/brig-basic-inst-handler.cc

index ce4aea615eb54cb6acaa2f8922d4755f2031faf4..0a2846d39242199f7f23e4301c18a14a78f138e0 100644 (file)
@@ -1,3 +1,7 @@
+2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
+
+       * brig/brigfrontend/brig-basic-inst-handler.cc:  Fix handling of NOPs.
+
 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
 
        Add flag -fassume-phsa that is on by default. If -fno-assume-phsa
index c8224ae6a51209c7b7f4b76983a0a3f2e46f6823..75e1cfac7ddbdbd1b187d15390fbcdedcc768034 100644 (file)
@@ -447,6 +447,8 @@ size_t
 brig_basic_inst_handler::operator () (const BrigBase *base)
 {
   const BrigInstBase *brig_inst = (const BrigInstBase *) base;
+  if (brig_inst->opcode == BRIG_OPCODE_NOP)
+    return base->byteCount;
 
   tree_stl_vec operands = build_operands (*brig_inst);
 
@@ -466,11 +468,9 @@ brig_basic_inst_handler::operator () (const BrigBase *base)
 
   BrigType16_t brig_inst_type = brig_inst->type;
 
-  if (brig_inst->opcode == BRIG_OPCODE_NOP)
-    return base->byteCount;
-  else if (brig_inst->opcode == BRIG_OPCODE_FIRSTBIT
-          || brig_inst->opcode == BRIG_OPCODE_LASTBIT
-          || brig_inst->opcode == BRIG_OPCODE_SAD)
+  if (brig_inst->opcode == BRIG_OPCODE_FIRSTBIT
+      || brig_inst->opcode == BRIG_OPCODE_LASTBIT
+      || brig_inst->opcode == BRIG_OPCODE_SAD)
     /* These instructions are reported to be always 32b in HSAIL, but we want
        to treat them according to their input argument's type to select the
        correct instruction/builtin.  */
This page took 0.064904 seconds and 5 git commands to generate.