<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54992>54992</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AArch64][SVE] (!State.VF.isScalable() || IsUniform) && "Can't scalarize a scalable vector" For Freeze Inst
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mongo1024
</td>
</tr>
</table>
<pre>
test case: https://godbolt.org/z/4TTjrEoxs
`opt -loop-vectorize -mattr=+sve -S`
```
target triple = "aarch64-unknown-linux-gnu"
; Function Attrs: argmemonly nofree nosync nounwind willreturn
declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #0
; Function Attrs: argmemonly nofree nosync nounwind willreturn
declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #0
define void @test() #1 personality i8* undef {
for.body.preheader:
br label %for.body
for.body: ; preds = %if.end, %for.body.preheader
%indvars.iv132 = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next133, %if.end ]
%arrayidx = getelementptr inbounds [1 x i8], [1 x i8]* undef, i64 0, i64 %indvars.iv132
%0 = load i8, i8* %arrayidx, align 1
br i1 false, label %if.end, label %lor.lhs.false
lor.lhs.false: ; preds = %for.body
%.fr122 = freeze i8 %0
%cmp9 = icmp eq i8 %.fr122, 0
br i1 %cmp9, label %if.end, label %switch.early.test
switch.early.test: ; preds = %lor.lhs.false
br label %if.end
if.end: ; preds = %switch.early.test, %lor.lhs.false, %for.body
%indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
%exitcond136.not = icmp eq i64 %indvars.iv.next133, 0
br i1 %exitcond136.not, label %for.end.loopexit, label %for.body
for.end.loopexit: ; preds = %if.end
ret void
}
attributes #0 = { argmemonly nofree nosync nounwind willreturn }
attributes #1 = { "target-features"="+aes,+crypto,+neon,+sha2" }
```
Why not vectorize `freeze` Instruction by widing it and instead replicating multiple times ? Does the `freeze` Instruction has the sve form ?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9VkuT2jgQ_jXmosLlF2AOHGAIVTlPNnuWbYGVyJJXknnk12-3ZMAGspnsIVMeLLm7v36qW4WqLivLjCUlNSxI16S2tjWwCJIdPAdVFUrYUOkD7H7Af_blyzf9SZ1NEG2DaE2CeaRaS6ZCqXZ6ZKVVmv9gZNpQa3WQboNkY46wfwdGL4IL_7itpfrALLGat4IRkCBBklCqy3qeTTv5XaqTnAouu_P0IDug9Sj-N92QXSdLy5Uka9CIphNAbFijpLgQqfaaMXiZiyzh1ckTlxU5cSE0s52WHqdipaCakaPiFQmySIhjEwq-Z5Y3LDRgow3biOdBkvN5RnjTUIzIG8FPa8AtaQtoLEiWYH4a_Xkbmaz-t4UV23N5B8Z6AJieMyYt00ZJKri99GidBBESLDZefq90WEAlha1mNaMV01hAvj5IoYmgBROANbsyDpXfvkFQPvqHIQVdlenrZcb3GAB0d6BlYE5vC3LK6ki1CfkxThMn3tacYMiC2YZEP4UA8tYRgWsEE0p2tnGa9pLeEsd9V0q1phdenZ0-qHYmWMOkba0mXBaQcPRktonJGQN8UzTY9zF3CQVbo-vi0aOB0shpE4pWLmvXShiYgx8hrQdJ4kG2eEz2VEA3AOotc_cA3z4JiJGoTeiZBxkdEz6W1qeMjkvFORTudZz4nOGBgS7Dc-fogKds2qXj4LAi7J-exYui-dHY017kV76aE7dlHTKqxSV052Pg7zPx1z4_-fsimuOz01s10Nt_-Y1z80Lvs_G-jsf2jE_Fy-N0PQcOmFYVkd2JSHN6XaYAGA9g2BmsULKK03kolR1n8FF-eOKe0_kANUojOoCNEocV8j0RXzWnkcAHgv2z5tQbCi3dddpezWI71IdDkxcd5ME1aY-w2PzWtCA3zDFafEODIeqn7nTPKA4Fg2MVZzUkZkNx-waLUl9aq_xaMiX9ytQUuJK7lod5_neNNoKPt7sAkPx5hQX5LI3VnR-GxQXMrrg8EG4JBSc4EKH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