-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed as not planned
Labels
llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimizationquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
In the benchmark, I noticed
%30 = zext i16 %.promoted47 to i32
%31 = mul nuw nsw i32 %30, 20
%32 = zext nneg i32 %31 to i64
%31 is not used at all elsewhere.
It should be
%30 = zext i16 %.promoted47 to i64
%31 = mul nuw nsw i64 %30, 20
https://alive2.llvm.org/ce/z/XpJe59
I noticed that LLVM did in fact do this properly when I did an unrelated change: #140178
But that is because the DAG was different, meaning there is an edge case where this is not happening when it should be.

Metadata
Metadata
Assignees
Labels
llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimizationquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!