https://github.com/perlfu commented: Needs tests. At a quick look algorithms could do with more comments explaining operation. Gut feeling is that some parts of this already exist elsewhere in backend? https://github.com/llvm/llvm-project/pull/171267