Issue 149080
Summary [clang-cuda] clang segfaults when trying to convert a float to a 128 bit integer on device
Labels cuda
Assignees
Reporter miscco
    consider the following minimal [reproducer](https://godbolt.org/z/7xbMofax1):

```cpp
__global__ void kernel() {
    float meow = 1.0f;
#if 1 
    [[maybe_unused]] auto val = static_cast<__int128_t>(meow);
#else
    [[maybe_unused]] auto val = static_cast<__int128_t>(static_cast<int>(meow));
#endif
}

int main() {
 float meow = 1.0f;
    auto val = __int128_t(meow);
    kernel<<<1, 1>>>();
    return 0;
}
```

This will fail with
```
fatal error: error in backend: unsupported library call operation
clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
```

It would be awesome if the library call could be implemented for the 128 bit integers and all builtin types

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to