[Beignet] [Printf v2][PATCH 12/12] Scalarize vector in printf.

yan.wang at linux.intel.com yan.wang at linux.intel.com
Sun Jan 31 23:43:28 PST 2016


From: Yan Wang <yan.wang at linux.intel.com>

Contributor: Junyan He <junyan.he at linux.intel.com>
Signed-off-by: Yan Wang <yan.wang at linux.intel.com>
---
 backend/src/llvm/llvm_scalarize.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/backend/src/llvm/llvm_scalarize.cpp b/backend/src/llvm/llvm_scalarize.cpp
index 899a696..2cc8179 100644
--- a/backend/src/llvm/llvm_scalarize.cpp
+++ b/backend/src/llvm/llvm_scalarize.cpp
@@ -678,6 +678,11 @@ namespace gbe {
             setAppendPoint(call);
             extractFromVector(call);
             break;
+          case GEN_OCL_PRINTF:
+            for (; CI != CS.arg_end(); ++CI)
+              if ((*CI)->getType()->isVectorTy())
+                *CI = InsertToVector(call, *CI);
+            break;
         }
       }
     }
-- 
2.4.3



More information about the Beignet mailing list