[llvm] [InstCombine] Don't fold struct-ret intrinsics into vector selects (PR #173062)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 19 10:00:06 PST 2025


https://github.com/dtcxzyw approved this pull request.

Nice catch!
Can you please also add a test with a scalar condition? This should work for struct-ret intrinsics.
```
define { <4 x float>, <4 x float> } @test_select_of_sincos_intrinsic_operand(<4 x float> %v, i1 %cond) {
  %s = select i1 %cond, <4 x float> %v, <4 x float> zeroinitializer
  %result = call { <4 x float>, <4 x float> } @llvm.sincos.v4f32(<4 x float> %s)
  ret { <4 x float>, <4 x float> } %result
}
```

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


More information about the llvm-commits mailing list