[Beignet] [Printf][PATCH 11/11] Scalarize vector in printf.

Yan Wang yan.wang at linux.intel.com
Wed Jan 20 19:31:20 PST 2016


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