[llvm] [InstCombine] Fold "extract (select (cond, insert(agg, elem), FV))" (PR #115969)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 16:07:26 PST 2024


dtcxzyw wrote:

> > We may generalize to use simplifyInstruction for other instructions in the future.
> 
> I'd rather directly do that than add a special case for extractelement. It's easier to generalize this than not. I did a quick test at #116073 and it doesn't seem to affect compile-time, which would have been my main concern.

@nikic Is it okay to just keep these negative tests and make this patch NFC? Positive tests have been added in https://github.com/llvm/llvm-project/commit/2ca25ab11d01ceacf359643b09aed7d53d0ff8dc.


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


More information about the llvm-commits mailing list