From 1135c437b19aa41c1a93eb8feab2cd348c9c5970 Mon Sep 17 00:00:00 2001 From: wenhuiNi <105279627+wenhuiNi@users.noreply.github.com> Date: Wed, 9 Nov 2022 16:40:14 +0800 Subject: [PATCH] [SYCLomatic] Fix comparsion of two APInt value with different bit width in isDefalutStreamfix comparsion (#347) Signed-off-by: Ni, Wenhui --- clang/lib/DPCT/Utility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/DPCT/Utility.cpp b/clang/lib/DPCT/Utility.cpp index 842a43f77d00..a71f9e022ab5 100644 --- a/clang/lib/DPCT/Utility.cpp +++ b/clang/lib/DPCT/Utility.cpp @@ -3096,7 +3096,7 @@ bool isDefaultStream(const Expr *StreamArg) { StreamArg->EvaluateAsInt(Result, dpct::DpctGlobalInfo::getContext())) { // 0 or 1 (cudaStreamLegacy) or 2 (cudaStreamPerThread) // all migrated to default queue; - return Result.Val.getInt() < APSInt::get(3); + return Result.Val.getInt().getZExtValue() < 3; } return false; }