Created attachment 81429 [details] SETCC Test case When performing vector comparisons, the R600/SI back-end is tripping over an LLVM assertion due to what appears to be an incorrectly lowered SETCC operation: llc: /home/awatry/src/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:522: llvm::SDValue llvm::DAGTypeLegalizer::PromoteIntRes_SETCC(llvm::SDNode*): Assertion `SVT.isVector() == N->getOperand(0).getValueType().isVector() && "Vector compare must return a vector result!"' failed. Test case is attached. Note that this test case just verifies that the assembly compiles and doesn't presume any specific expected output. SETCC will need to be fixed in order for a number of OpenCL comparisons and piglit tests to pass.
This patch should fix the crash: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130624/179336.html
The patch fixes the crash in that LLVM (llc specifically) now goes into an infinite loop. Note: I tested this with your 10-patch KCache/cleanup/mul24/mad24 series applied (the same revised patches I sent to llvm-commits earlier this week). I haven't had any time yet to look into where it's getting stuck... Feel free to try to track it down if I don't respond in the next few days.
Looks like it's infinitely looping in and out of getSetCCResultType in SIISelLowering.cpp. I'll have to read up a bit and try to figure out the next move.
This is working now.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.