diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-09-19 15:27:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-19 15:27:50 -0400 |
| commit | 653fe976af88fcf86162ca5bb1b46d4378864572 (patch) | |
| tree | 882307a3377e6a4587231721d681daa061a56c78 /tests/ir | |
| parent | a37b3539d94c434c5d74ab524eae2988e48e0756 (diff) | |
Support for IRStringLit (#645)
* * Added support for strings in IR with IRStringLit - with storage of chars after it
* Added kIRDecorationOp_Transitory - can be used for detecting instructions constructed on stack
* Made IRConstant hashing work off type
* Fix comment that is out of date about how an instruction is determines to hold a transitory string.
Diffstat (limited to 'tests/ir')
| -rw-r--r-- | tests/ir/string-literal.slang | 9 | ||||
| -rw-r--r-- | tests/ir/string-literal.slang.expected | 20 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/ir/string-literal.slang b/tests/ir/string-literal.slang new file mode 100644 index 000000000..e0c893014 --- /dev/null +++ b/tests/ir/string-literal.slang @@ -0,0 +1,9 @@ +//TEST(compute):SIMPLE:-dump-ir -profile cs_5_0 -entry main + +[numthreads(1, 1, 1)] +void main( + uint tid : SV_DispatchThreadIndex) +{ + "Hello \t\n\0x083 World"; +} + diff --git a/tests/ir/string-literal.slang.expected b/tests/ir/string-literal.slang.expected new file mode 100644 index 000000000..8df3ff00e --- /dev/null +++ b/tests/ir/string-literal.slang.expected @@ -0,0 +1,20 @@ +result code = 0 +standard error = { +let %1 : _ = UInt() +let %2 : _ = Void() +let %3 : _ = Func(%2, %1) +let %4 : _ = BasicBlock() +Ptr(%1) +let %5 : _ = String() +let %6 : %5 = string_constant("Hello \t\n\0x083 World") + +func @_S04mainp1puV : %3 +{ +block %7( + param %8 : %1): + return_void() +} + +} +standard output = { +} |
