[clang] [llvm] [SPIRV] add pre legalization instruction combine (PR #122839)
Vyacheslav Levytskyy via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 04:08:06 PST 2025
VyacheslavLevytskyy wrote:
@farzonl Thank you for adding instcombine/pattern matching capabilities. LGTM overall.
Maybe we should also document each transformation a bit in comments to the corresponding function, so that we clearly see what kind of input we expect to see to run the substitution? It could be anything in style of lib/Transforms/InstCombine/InstructionCombining.cpp comments (e.g., `(op (cast (op X, C2)), C1) --> (cast (op X, op (C1, C2)))`) or in style of more lengthy comments in lib/Target/SPIRV/SPIRVPreLegalizer.cpp (e.g., `propagateSPIRVType`). What do you think?
https://github.com/llvm/llvm-project/pull/122839
More information about the llvm-commits
mailing list