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 c900a285bc7b1d3abf5aaa632f1e6ec3cb3958c3..88308ce17907282670de9ee5f1ad35fb6524b9ba 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();
       }
    }