Simon Pilgrim
Simon Pilgrim
I think we're just missing the folds: ``` ---------------------------------------- define i4 @src(i4 %x, i4 %y) { %0: %a = add i4 %x, %y %m = umin i4 %x, %y %s...
cheers, I'll create a patch
> cheers, I'll create a patch https://reviews.llvm.org/D123399
It looks like ValueTracking is missing the ability to recognise when phi sources branched due to the source having a particular icmp value range: ``` entry: %cmp23 = icmp ugt...
Candidate Patch: https://reviews.llvm.org/D131838
> Candidate Patch: https://reviews.llvm.org/D131838 This fixed the vectorization issue - but not the unrolling. I should add that the ValueTracking phi handling is post-fixing the problem, not preventing it -...
The last remaining issue is the scalar loop unrolling: https://godbolt.org/z/f373Tc7oM ValueTracking has failed to realise that the '%count.addr.0.lcssa value is known to be 0 < v < 8: ``` while.body6.preheader:...
> I'm guessing you meant > > %cond.idx = select i1 %tobool.not, i64 6, i64 0 > > %cond.idx9 = add i64 %cond.idx, %offset > > --> > > %cond.idx9...
Current Codegen: ``` define void @dec(i32* nocapture %base, i64 %offset, i32 %sel) { %tobool.not = icmp eq i32 %sel, 0 %cond.idx = select i1 %tobool.not, i64 6, i64 0 %cond.idx9...
Alternative Patch: https://reviews.llvm.org/D106450