Skip to content

Conversation

@tex3d
Copy link
Contributor

@tex3d tex3d commented Aug 24, 2023

IsHLSLNodeIOType is supposed to capture all node object types, but was missing output record and output array types.

TranslateHLCastHandleToRes had LLVM_FALLTHROUGH in for two cases where it made no sense to fall through to the next case.

MergeGepUse is needed after lowering GetRecordPtr to collapse GEP chains that could result in intermediate multi-dimension array pointers from GEPs, which is considered an invalid DXIL type.

Updated some tests for -Od compilations. Added a test for the multi-dim GEP case.

Some CHECKs needed specialization for -Od:

  • align 4 added to load/store only with optimizations enabled
  • no CSE of index/annotate node handle
  • also, use CHECK-LABEL to make failure investigations easier

Fixes #5597

tex3d added 2 commits August 24, 2023 00:38
IsHLSLNodeIOType is supposed to capture all node object types, but was missing output record and output array types. TranslateHLCastHandleToRes had LLVM_FALLTHROUGH in for two cases where it made no sense to fall through to the next case. Updated some tests for -Od compilations. Some CHECKs needed specialization for -Od: - align 4 added to load/store only with optimizations enabled - 2-stage GEPs for accessing matrix elements - no CSE of index/annotate node handle
@tex3d tex3d self-assigned this Aug 24, 2023
tex3d added 2 commits August 24, 2023 18:48
Without optimizations, GEP chains may be used to access multi-dim arrays within structures. These arrays are legal within the DXIL structure, but not allowed as an intermediate pointer returned from a GEP. This change runs MergeGepUse after lowering UDT types to merge and eliminate GEPs that return multi-dim array pointers. A side-effect of running MergeGepUse is that GEPs are marked as inbounds.
@tex3d tex3d merged commit 9a2d4d8 into microsoft:staging-sm-6.8 Aug 26, 2023
@tex3d tex3d deleted the fix-wg-no-opt branch August 26, 2023 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants