Skip to content

Commit

Permalink
[SYCLomatic] Fix comparsion of two APInt value with different bit wid…
Browse files Browse the repository at this point in the history
…th in isDefalutStreamfix comparsion (#347)

Signed-off-by: Ni, Wenhui <wenhui.ni@intel.com>
  • Loading branch information
wenhuiNi authored Nov 9, 2022
1 parent 579be32 commit 1135c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/DPCT/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1135c43

Please sign in to comment.