[llvm] [SimplifyLibCalls] Shrink llvm.sincos.f64 to llvm.sincos.f32 (PR #211218)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 23 00:17:12 PDT 2026
================
@@ -134,6 +134,64 @@ define { float, float } @sin_cos_pair_shrink(float %f) {
ret { float, float } %r1
}
+define { <2 x float>, <2 x float> } @sincos_shrink_vector(<2 x float> %f) {
+; CHECK-LABEL: define { <2 x float>, <2 x float> } @sincos_shrink_vector(
+; CHECK-SAME: <2 x float> [[F:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = call fast { <2 x float>, <2 x float> } @llvm.sincos.v2f32(<2 x float> [[F]])
+; CHECK-NEXT: ret { <2 x float>, <2 x float> } [[TMP1]]
+;
+ %d = fpext fast <2 x float> %f to <2 x double>
----------------
arsenm wrote:
Restrict to minimal flags needed for the transform (which is none, in which case just have a specific flag preserve test or use an innocuous example)
https://github.com/llvm/llvm-project/pull/211218
More information about the llvm-commits
mailing list