Skip to content

Commit dded820

Browse files
authored
[CG] Re-add code accidentally removed in conflict resolution. (#11146)
Commit 28b9e76 merged 'main' to 'sycl-web'. The conflict resolution for this merge accidentally removed logic preventing builtins from being emitted for SYCL device code on the NVPTX target. This patch re-adds that logic. Fixes the following LIT regressions: Clang :: CodeGenSYCL/sycl-libdevice-cmath.cpp
1 parent 1b60fb4 commit dded820

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2452,7 +2452,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
24522452
GenerateIntrinsics =
24532453
ConstWithoutErrnoOrExceptions && ErrnoOverridenToFalseWithOpt;
24542454
}
2455-
if (GenerateIntrinsics) {
2455+
if (GenerateIntrinsics &&
2456+
!(getLangOpts().SYCLIsDevice && getTarget().getTriple().isNVPTX())) {
24562457
switch (BuiltinIDIfNoAsmLabel) {
24572458
case Builtin::BIceil:
24582459
case Builtin::BIceilf:

0 commit comments

Comments
 (0)