Skip to content
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

Latest bugfixes #1

Merged

Conversation

devshgraphicsprogramming
Copy link
Member

No description provided.

llvm-beanz and others added 28 commits October 18, 2023 11:55
This enables `.ll` as a default test suffix in the LLVM tests. To
preserve the low number of unsupported tests, this changes the way we
disable tests from using config.unsupported to setting the suffixes to
empty.
The previous PR #5881 didn't do what it meant to and had a lot of debug
code due to a mistaken commit. This reverts that commit and restores the
setting of the build type flag
Update comment for sanitizer fix in
#5851
…#5889)

When DxilModule metadata is serialized, semantic strings for system
values are canonicalized. If these strings are used anywhere, this can
lead to a difference in behavior between an original DxilModule that has
not undergone serialization and one that has been deserialized.

This change canonicalizes the string as soon as a DxilSignatureElement
is created, thereby removing the possibility of accidentally relying on
the non-canonical string for a system value.
hcttest noexec will execute clang tests.
Clang tests include both spirv lit tests and unit tests. So running
hcttest spirv_only is redundant.

Fixes #5890
Moved from bottom, skipped CompatibilityWithVk1p1.
Convert the moved shaders to lit FileCheck test.
When using an initializer list to initialize a class with base classes,
the base classes should be initialized first, and then used as members
of the child class.

This seems to be something of a niche case, but it is one of the asserts
that are failing for
#5638.
In order to handle types such as `RWStructuredBuffer`, which has the
method `operator[]()`, `operator[]` is treated as a special case by our
access chain creation code - it's treated similarly to
`ArraySubscriptExpr`. This has the unfortunate side effect that
user-defined `operator[]` overloads are not called in all cases.

To fix this, this PR adds a check for whether a type is user-defined
before handling `operator[]` in `collectArrayStructIndices`.

Part of the fix for #5638.
Convert from bottom of CodeGenSpirvTest.cpp.
Skipped FileTest::CompatibilityWithVk1p1 as barrier for runCodeTest.
Moved from CompatibilityWit6hVk1p1
Convert the moved shaders to lit FileCheck test.
DXIL doesn't support the bswap intrinsic, normally a backend would lower
this intrinsic to something else, in this case we don't have a backend
so we just end up generating invalid DXIL.

The solution here is to disable bswap matching when targeting DXIL.

Fixes #5104
Just add the missing expected-note.

This is for
#5870
Convert first part of verify test shaders as lit FileCheck test.

This is for
#5870

CppErrorsHV2015 is skipped for cannot set hlsl 2015 thru dxc. 
CppErrors is skipped for non-expected warning when test with taef.
…5895)

This commit fixes a crash in the compiler when lowering a groupshared
variable with a multi-dimensional array type. The root cause of the bug
was that we had a nested gep expression that could not be merged into a
single gep because of an intervening addrspacecast.

The `MultiDimArrayToOneDimArray` pass flattens the multi-dimension
global variables to a single dimension. It relies on the `MergeGepUse`
function to flatten any nested geps into a single gep that fully
dereferences a scalar element.

The fix is to modify the `MergeGepUse` function to look through
addrspacecast instructions when trying to merge geps. We can now merge
geps like

    gep(addrspacecast(gep(p0, gep_args0)) to p1*, gep_args1)

into

    addrspacecast(gep(p0, gep_args0+gep_args1) to p1*)

We also added a call to `removeDeadConstantUsers` before flattening
multi-dimension globals because we can have some dead constants hanging
around after merging geps and these constants should be ignored by the
flattening pass.
Convert from bottom of CodeGenSpirvTest.cpp.
Skipped FileTest::CompatibilityWithVk1p1 as barrier for runCodeTest.
Started from CompatibilityWit6hVk1p1
Convert the moved shaders to lit FileCheck test.
These tests are failing in our downstream builds after migrating to Lit
due to CHECK-NOTs referencing variables before they are defined. Those
CHECK-NOTs have now been replaced with an `--implicit-check-not` that
checks that there are no `OpDecorate ... NoContraction` instructions
other than those CHECKed in the test.
A few syntax errors fixed along the way:
- hcttracei.py: `print` -> `print()`, `<>` -> `!=`
- hcttest-system-values.py: `os.path.join()` close paren before
arguments
CHECK-COUNT-# was not yet implemented in the version of FileCheck used
in DXC, so these lines were not checked at all. Switching them to CHECKs
caused the tests to fail, so they're now replaced with a combination of
a CHECK and CHECK-NOT that pass.

This was caught by the downstream test runner that uses a newer version
of FileCheck which does check CHECK-COUNTs.
Convert from bottom of CodeGenSpirvTest.cpp.
Skipped FileTest::CompatibilityWithVk1p1 as barrier for runCodeTest.
While theoratically required in pre-C++11 to avoid re-allocation upon
call, C++11 guarantees that c_str() returns a pointer to the internal
array so pre-calling c_str() is no longer required.

llvm-svn: 242983

---------

Co-authored-by: Yaron Keren <[email protected]>
Disable integer resource for SampleCmp/CmpLevel/CmpLevelZero.

Fixes #5564
This is a follow up to #5932
There is some extra code that isn't used that may be deleted. IT should
also be deleted since it references code that has already been deleted
in #5932.
This polishes #5922
The default generated RUN line generated by ExtractIRForPassTest.py adds
the desired pass to the options, but forgot to add the '-', so it would
fail with difficult to diagnose error in dxopt during argument parsing.

This adds the missing '-' so the RUN line doesn't have to be fixed in
this way every time the script is used.
DxilRemoveDeadBlocks assumed it could run with an uninitialized
DxilModule, because the test case had been captured from live state
without the needed DXIL metadata. DxilRemoveDeadBlocks relies on
DxilValueCache, which relies on code in DxilSimplify, which assumes we
have a DxilModule if there are dxil ops. Without an initialized
DxilModule with the correct low-precision mode, cached ops and types may
be wrong.

This change:
- modifies DxilRemoveDeadBlocks to remove bSkipInit
- updates the test to contain the metadata needed to initialize
DxilModule
@devshgraphicsprogramming devshgraphicsprogramming merged commit 2ae9b2b into Devsh-Graphics-Programming:devshFixes Oct 26, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants