Issue 141360
Summary LLVM fails to reduce zext(op(zext)) in some cases
Labels new issue
Assignees
Reporter AZero13
    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: https://github.com/llvm/llvm-project/pull/140178

But that is because the DAG was different, meaning there is an edge case where this is not happening when it should be.

<img width="1067" alt="Image" src="" />
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to