[PATCH] D92739: [ValueTracking] Branch on poison is UB
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 6 13:01:00 PST 2020
nikic added inline comments.
================
Comment at: llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll:3
; RUN: opt -S -loop-unroll -unroll-runtime %s -o - | FileCheck %s
-; RUN: opt -S -loop-unroll -unroll-runtime -unroll-max-upperbound=6 %s -o - | FileCheck %s --check-prefix=UPPER
+; RUN: opt -S -loop-unroll -unroll-runtime -unroll-max-upperbound=4 %s -o - | FileCheck %s --check-prefix=UPPER
----------------
There is a comment below that says:
> ; Check that loop in hoge_5, with a runtime upperbound of 5, is unrolled when -unroll-max-upperbound=4
But the option actually used `-unroll-max-upperbound=6`. Previously SCEV didn't realize that the upperbound is actually 5, so this worked out fine. Now that it does, we have to use the correct value for the option.
================
Comment at: llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll:66
%tmp3 = add i32 %tmp0, %tmp2
- %i.next = add nuw nsw i64 %i, -1
+ %i.next = add nsw i64 %i, -1
%cond = icmp sgt i64 %i.next, 0
----------------
An add of `-1` can clearly not be nuw. Presumably someone manually adjusted the `forward` case to go in the reverse direction, but retained the no longer applicable nuw flag.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92739/new/
https://reviews.llvm.org/D92739
More information about the llvm-commits
mailing list