Skip to content

Commit 7c8bf8f

Browse files
committed
Alter SYCL device compiler optimization pipeline for SPIR target only.
Signed-off-by: Alexey Bader <[email protected]>
1 parent 5a41ab2 commit 7c8bf8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM,
612612
// NOTE: We use "normal" inliner (i.e. from O2/O3), but limit the rest of
613613
// optimization pipeline. Inliner is a must for enabling size reduction
614614
// optimizations.
615-
if (LangOpts.SYCLIsDevice) {
615+
if (LangOpts.SYCLIsDevice && TargetTriple.isSPIR()) {
616616
PMBuilder.OptLevel = 1;
617617
PMBuilder.SizeLevel = 2;
618618
PMBuilder.SLPVectorize = false;

0 commit comments

Comments
 (0)