Issue |
128071
|
Summary |
[DirectX] Error if unknown intrinsic makes it to DXILOpLowering.cpp
|
Labels |
backend:DirectX
|
Assignees |
farzonl
|
Reporter |
farzonl
|
For the purposes of this ticket an unknown intrinsic is defined as any intrinsics not defined in `llvm/lib/Target/DirectX/DXIL.td`. In other words intrinsics not mapped to a DXIL Op.
Today we are letting these intrinsics slip through and we only catch the failure in the DXIL validator.
> Why is this a problem?
Clang builtins are usable in HLSL mode so intrinsics we never intended to support could also make their way to the DirectX backend.
Example:
https://hlsl.godbolt.org/z/13rPj18vn
This is because we don't error in the default case, we just skip it if we don't know what to do with it.
https://github.com/llvm/llvm-project/blob/87bf23216fc1257e88e0d38730df2d0187ff5bc6/llvm/lib/Target/DirectX/DXILOpLowering.cpp#L788-L789
Solution we should return some diagnositcs so the User knows the builtin and its coresponding llvm codegen is not valid when targeting the DirectX backend.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs