Skip to content

Commit 714eb5b

Browse files
committed
[SYCL] Minor fixes to SYCLConditionalCallOnDevice pass
This patch fixes minor issues in impl and tests for SYCLConditionalCallOnDevice pass: - new FCaller function now have attributes from the old one - fix tests to support RelWithDebInfo and Debug modes
1 parent 2172d9e commit 714eb5b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

llvm/lib/SYCLLowerIR/SYCLConditionalCallOnDevice.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ SYCLConditionalCallOnDevicePass::run(Module &M, ModuleAnalysisManager &) {
104104
&M);
105105

106106
NewFCaller->setCallingConv(FCaller->getCallingConv());
107+
NewFCaller->setAttributes(FCaller->getAttributes());
107108

108109
DenseMap<CallInst *, CallInst *> OldCallsToNewCalls;
109110

llvm/test/SYCLLowerIR/ConditionalCallOnDevice/conditional-call-on-device-1.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ entry:
2828
ret void
2929
}
3030

31-
; CHECK: declare spir_func void @call_if_on_device_conditionally_PREFIX_1(ptr, ptr, i32, i32)
31+
; CHECK: declare spir_func void @call_if_on_device_conditionally_PREFIX_1(ptr[[VAL1:.*]], ptr[[VAL2:.*]], i32[[VAL3:.*]], i32[[VAL4:.*]])
3232

3333
attributes #2 = { convergent mustprogress norecurse nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
3434
attributes #6 = { convergent inlinehint mustprogress norecurse nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }

llvm/test/SYCLLowerIR/ConditionalCallOnDevice/conditional-call-on-device-2.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ entry:
4242
ret void
4343
}
4444

45-
; CHECK: declare spir_func void @call_if_on_device_conditionally1_PREFIX_1(ptr, ptr, i32, i32)
46-
; CHECK: declare spir_func void @call_if_on_device_conditionally2_PREFIX_2(ptr, ptr, i32, i32)
45+
; CHECK: declare spir_func void @call_if_on_device_conditionally1_PREFIX_1(ptr[[VAL1:.*]], ptr[[VAL2:.*]], i32[[VAL3:.*]], i32[[VAL4:.*]])
46+
; CHECK: declare spir_func void @call_if_on_device_conditionally2_PREFIX_2(ptr[[VAL1:.*]], ptr[[VAL2:.*]], i32[[VAL3:.*]], i32[[VAL4:.*]])
4747

4848
attributes #2 = { convergent mustprogress norecurse nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
4949
attributes #6 = { convergent inlinehint mustprogress norecurse nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }

0 commit comments

Comments
 (0)