- 
                Notifications
    
You must be signed in to change notification settings  - Fork 15.1k
 
[DirectX] add Function name to DiagnosticInfoUnsupported Msg in DXILOpLowering #136234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // RUN: %if clang-dxc %{not %clang_dxc -T lib_6_3 %s 2>&1 | FileCheck %s %} | ||
| 
     | 
||
| // CHECK: error: Unsupported intrinsic llvm.vector.reduce.and.v4i32 for DXIL lowering | ||
| 
     | 
||
| export int vecReduceAndTest(int4 vec) { | ||
| return __builtin_reduce_and(vec); | ||
| } | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -139,7 +139,7 @@ class DiagnosticInfo { | |
| using DiagnosticHandlerFunction = std::function<void(const DiagnosticInfo &)>; | ||
| 
     | 
||
| class DiagnosticInfoGeneric : public DiagnosticInfo { | ||
| const Twine &MsgStr; | ||
| const Twine MsgStr; | ||
                
       | 
||
| const Instruction *Inst = nullptr; | ||
| 
     | 
||
| public: | ||
| 
          
            
          
           | 
    ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 
          
            
          
           | 
    @@ -8,7 +8,6 @@ | |||||||||||
| 
     | 
||||||||||||
| #include "DXILOpLowering.h" | ||||||||||||
| #include "DXILConstants.h" | ||||||||||||
| #include "DXILIntrinsicExpansion.h" | ||||||||||||
| #include "DXILOpBuilder.h" | ||||||||||||
| #include "DXILShaderFlags.h" | ||||||||||||
| #include "DirectX.h" | ||||||||||||
| 
        
          
        
         | 
    @@ -27,6 +26,7 @@ | |||||||||||
| #include "llvm/InitializePasses.h" | ||||||||||||
| #include "llvm/Pass.h" | ||||||||||||
| #include "llvm/Support/ErrorHandling.h" | ||||||||||||
| #include "llvm/Support/FormatVariadic.h" | ||||||||||||
| 
     | 
||||||||||||
| #define DEBUG_TYPE "dxil-op-lower" | ||||||||||||
| 
     | 
||||||||||||
| 
          
            
          
           | 
    @@ -756,9 +756,10 @@ class OpLowerer { | |||||||||||
| case Intrinsic::not_intrinsic: | ||||||||||||
| continue; | ||||||||||||
| default: { | ||||||||||||
| DiagnosticInfoUnsupported Diag( | ||||||||||||
| F, "Unsupported intrinsic for DXIL lowering"); | ||||||||||||
| M.getContext().diagnose(Diag); | ||||||||||||
| std::string Msg = | ||||||||||||
| formatv("Unsupported intrinsic {0} for DXIL lowering", F.getName()) | ||||||||||||
| .str(); | ||||||||||||
                
       | 
||||||||||||
| std::string Msg = | |
| formatv("Unsupported intrinsic {0} for DXIL lowering", F.getName()) | |
| .str(); | |
| SmallString<128> Msg = | |
| formatv("Unsupported intrinsic {0} for DXIL lowering", F.getName()); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's a
clang-dxcfeature, so I suspect this just never runs at all. This will fail if the DirectX backend isn't available, so I don't think gating on clang-dxc would be correct anyway.I think you actually want
REQUIRES: directx-registered-targetin this test, and to drop the%ifstuff.