-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Closed
Copy link
Labels
llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimization
Description
The following reduced IR is derived from https://github.com/berkeley-abc/abc/blob/b28e042afdf0a869f3ececbe054a60e02fcd2ffc/src/bool/bdc/bdcSpfd.c#L83
Godbolt: https://godbolt.org/z/z9frEof9E
alive2 proof: https://alive2.llvm.org/ce/z/ULwEjv
define range(i32 0, 7) i32 @Bdc_SpfdAdjCost(i32 %0) local_unnamed_addr #0 {
%2 = insertelement <4 x i32> poison, i32 %0, i64 0
%3 = shufflevector <4 x i32> %2, <4 x i32> poison, <4 x i32> zeroinitializer
%4 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %3)
ret i32 %4
}
expected:
define range(i32 0, 7) i32 @tgt(i32 %0) local_unnamed_addr #0 {
%2 = shl i32 %0, 2
ret i32 %2
}
Metadata
Metadata
Assignees
Labels
llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimization