[llvm] [VectorCombine] Pass flags during IR creation (PR #193271)

Jack Huang via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 27 05:30:32 PDT 2026


jackhong12 wrote:

Hi @arsenm,
I found that we already have utilities for these flag kinds in IRBuilder. For example, CreateExactBinOp creates an instruction with the exact flag, and CreateNoWrapBinOp handles the no-wrap flags. In the latest change, I've switched to using these existing APIs. I'm not sure whether we still need any new APIs here.
If we do still need a new API, one possible approach would be to pass the original instruction as an argument and copy the relevant flags when creating the new instruction.

https://github.com/llvm/llvm-project/pull/193271


More information about the llvm-commits mailing list