Keenuts wrote:

Ok, so I've figured out 3 issues:

1. A bug in my sorting of merge instructions. If LHS == RHS, I returned LHS < 
RHS, that was wrong. Executed outside of GDB, it was very slow to show the 
backtrace and crash, so tests looked like it was hanging, but it was just 
crashing.
2. An existing bug in the SPIRVPreLegalizer: the GET_ID instruction insertion 
point is wrong. Seems like I found a quick fix.
3. When SPIRVGlobalRegistry is used to create OpTypeBool, it creates it not in 
the main BB, but in the current location. Meaning if you then want this type on 
a BB located before the last insertion point, you'll end-up with a "use before 
declare".

Fixing those 3 allowed me to get later in the verification process. I now have 
2 more types of issues:
- OpBranch/OpBranchConditional are not considered to be valid basic block 
terminators
- OpLoopMerge are taking BB operands, but verifier expected register operand.

I'd be tempted to fix the issue 1 (the actual iterator issue), but leave the 
rest unfixed in this PR (which is already huge).
Then, in distrinct PRs, fir 1 and 2, and then address the next ones.

https://github.com/llvm/llvm-project/pull/107408
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to