[llvm] [InstCombine] Canonicalize `extractvalue + select` (PR #84686)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 10 12:45:26 PDT 2024


dtcxzyw wrote:

> I think the proper way to do this would be to call FoldOpIntoSelect for extractvalue.

https://github.com/llvm/llvm-project/blob/193b3d6733b7bf606c70749b1b65b6a0daae97d5/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L1658-L1661

`FoldOpIntoSelect` doesn't handle non-constant select arms.



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


More information about the llvm-commits mailing list