Created attachment 80907 [details]
I've attached test results.
Test 1: add uints and divide by 3
Test 2: test 1 done 10 times in a for loop
Test 3: divide uints
Test 4: if statement dependent on load with an addition in the false branch.
Test 1 works, tests 2 and 3 halt and test 4 crashes.
I will take a look at this when I get a chance. In the mean time it would be great if you could convert these into piglit tests. Here is a good example:
Probably one file for each test would be good.
Created attachment 80967 [details]
Test Code from initial post converted to piglit tests
I've taken a shot at converting the original tests to piglit tests.
I'll test a radeon 7850 in a bit, but I know that Cedar (radeon 5400, so evergreen) also fails each of these tests (and I got a GPU hang running the uint div test after 6-7 times).
Created attachment 80969 [details]
Shader dumps from a radeon 7850 for test cases in attachment 80967 [details]
Created attachment 81026 [details] [review]
Updated piglit tests
Thanks for writing the piglit tests, I noticed a few bugs in them though. First, the output argument for all of the tests should be index 2 and not index 0 and second, in test #2 the buffer index should be multiplied by 8 instead of 10. I've fixed the piglit tests in the attached patch and also replaced the '_' with '-' in the filename. The updated tests pass on my Llano APU.
Ack! You're right. I'm so used to the output being arg 0 from every other piglit test that I neglected to check these.
With that and the index multiplier changed, these tests also pass on Cedar.
All of the test cases currently pass on my pitcairn, except for the code-in-else test, which fails with:
cl-program-tester: /home/awatry/src/llvm/include/llvm/Target/TargetRegisterInfo.h:560: const llvm::TargetRegisterClass* llvm::TargetRegisterInfo::getRegClass(unsigned int) const: Assertion `i < getNumRegClasses() && "Register Class ID out of range"' failed.
0. Running pass 'Function Pass Manager' on module 'radeon'.
1. Running pass 'AMDGPU DAG->DAG Pattern Instruction Selection' on function '@test4'
I'll attach the assembly in a follow-up
Created attachment 81042 [details]
This test case is working for me now. Please re-open if you are still having problems.