[llvm] [VPlan] Handle loads feeding memops in makeMemOpWideningDecisions (NFC) (PR #196842)
Valery Dmitriev via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 15:48:18 PDT 2026
valerydmit wrote:
We are observing some runtime failures associated with this patch.
I tried to create a reproducer:
[reproducer.zip](https://github.com/user-attachments/files/29398156/reproducer.zip)
opt --passes=loop-vectorize -S reproducer.ll
The problem is best seen on the vector drain loop:
```
%83 = getelementptr nusw nuw [8 x i8], ptr @_Aglob, i64 %82
%84 = load double, ptr %83, align 8, !tbaa !0, !alias.scope !6
%85 = load double, ptr %83, align 8, !tbaa !0, !alias.scope !6
%86 = load double, ptr %83, align 8, !tbaa !0, !alias.scope !6
%87 = load double, ptr %83, align 8, !tbaa !0, !alias.scope !6
%88 = insertelement <4 x double> poison, double %84, i32 0
%89 = insertelement <4 x double> %88, double %85, i32 1
%90 = insertelement <4 x double> %89, double %86, i32 2
%91 = insertelement <4 x double> %90, double %87, i32 3
%92 = fcmp ole <4 x double> zeroinitializer, %91
```
before the patch that was a normal wide load:
```
%48 = getelementptr nusw nuw [8 x i8], ptr @_Aglob, i64 %47
%wide.load38 = load <4 x double>, ptr %48, align 8, !tbaa !0, !alias.scope !6
%49 = fcmp ole <4 x double> zeroinitializer, %wide.load38
```
The main vector body suffers from same issue.
Could you please take a look?
https://github.com/llvm/llvm-project/pull/196842
More information about the llvm-commits
mailing list