Set correct type for ir_dereference of a matrix or a vector
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 5 Apr 2010 17:30:15 +0000 (10:30 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 5 Apr 2010 17:30:15 +0000 (10:30 -0700)
ir.cpp

diff --git a/ir.cpp b/ir.cpp
index c900a28..88308ce 100644 (file)
--- a/ir.cpp
+++ b/ir.cpp
@@ -186,7 +186,9 @@ ir_dereference::ir_dereference(ir_instruction *var,
 
       if (vt->is_array()) {
         type = vt->element_type();
-      } else if (vt->is_matrix() || vt->is_vector()) {
+      } else if (vt->is_matrix()) {
+        type = vt->column_type();
+      } else if (vt->is_vector()) {
         type = vt->get_base_type();
       }
    }