File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
test/Transforms/DeadArgElim Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -773,11 +773,6 @@ constexpr StringLiteral OMIT_TABLE_BEGIN("// OMIT_TABLE_BEGIN");
773773constexpr StringLiteral OMIT_TABLE_END (" // OMIT_TABLE_END" );
774774static void updateIntegrationHeader (StringRef SyclKernelName,
775775 const ArrayRef<bool > &ArgAlive) {
776- // TODO: Enable asserts once the driver will provide the option.
777- if (!IntegrationHeaderFileName.getNumOccurrences ())
778- return ;
779- // assert(IntegrationHeaderFileName.hasArgStr() &&
780- // "Integration header file not specified!");
781776 ErrorOr<std::unique_ptr<MemoryBuffer>> IntHeaderBuffer =
782777 MemoryBuffer::getFile (IntegrationHeaderFileName);
783778
@@ -1196,6 +1191,11 @@ bool DeadArgumentEliminationPass::RemoveDeadStuffFromFunction(Function *F) {
11961191
11971192PreservedAnalyses DeadArgumentEliminationPass::run (Module &M,
11981193 ModuleAnalysisManager &) {
1194+ // Integration header file must be provided for
1195+ // DAE to work on SPIR kernels.
1196+ if (CheckSyclKernels && !IntegrationHeaderFileName.getNumOccurrences ())
1197+ return PreservedAnalyses::all ();
1198+
11991199 bool Changed = false ;
12001200
12011201 // First pass: Do a simple check to see if any functions can have their "..."
Original file line number Diff line number Diff line change 1- ; TODO: this should be crashing (not --crash) after enabling assert
2- ; RUN: opt < %s -deadargelim-sycl -S
3-
4- ; Path to the integration header is not specified.
1+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
2+ ; RUN: opt < %s -deadargelim-sycl -S | FileCheck %s
3+ ; Skip DAE if the path to the integration header is not specified.
54
65target triple = "spir64-unknown-unknown-sycldevice"
76
87define weak_odr spir_kernel void @NegativeSyclKernel (float %arg1 , float %arg2 ) {
8+ ; CHECK-LABEL: define {{[^@]+}}@NegativeSyclKernel
9+ ; CHECK-SAME: (float [[ARG1:%.*]], float [[ARG2:%.*]])
10+ ; CHECK-NEXT: call void @foo(float [[ARG1]])
11+ ; CHECK-NEXT: ret void
12+ ;
913 call void @foo (float %arg1 )
1014 ret void
1115}
You can’t perform that action at this time.
0 commit comments