[llvm] [InstCombine] Use the select condition to try to constant fold binops into select (PR #84696)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 08:31:28 PDT 2024


dtcxzyw wrote:

> the right approach would be teach the backend to undo this

TBH it is hard to undo the transform :(

IIRC the backend doesn't even reuse constants that have been materialized.
Related issues: https://github.com/llvm/llvm-project/issues/80880 https://github.com/llvm/llvm-project/issues/71389 https://github.com/llvm/llvm-project/issues/68712


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


More information about the llvm-commits mailing list