[llvm] [InstCombine] Pull extract through broadcast (PR #143380)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 06:35:11 PDT 2025
================
@@ -0,0 +1,52 @@
+; RUN: opt -passes=instcombine -S < %s | FileCheck %s
+
+define float @extract_from_zero_init_shuffle(<2 x float> %1, i64 %idx) {
+; CHECK-LABEL: @extract_from_zero_init_shuffle(
+; CHECK-NEXT: [[TMP1:%.*]] = extractelement <2 x float> [[W:%.*]], i64 0
+; CHECK-NEXT: ret float [[TMP1]]
+;
+ %3 = shufflevector <2 x float> %1, <2 x float> poison, <4 x i32> zeroinitializer
----------------
RKSimon wrote:
(style) avoid using numbers for variable names (%vec, %shuffle and %extract would be better)
https://github.com/llvm/llvm-project/pull/143380
More information about the llvm-commits
mailing list