Skip to content

Commit

Permalink
[LoopVectorize] Remove incorrect nuw flag from test (NFC)
Browse files Browse the repository at this point in the history
nuw does not make sense for reverse iteration.
  • Loading branch information
nikic committed May 10, 2022
1 parent c077510 commit ff20ee3
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -65,7 +65,7 @@ for.body:
%tmp1 = getelementptr inbounds i32, i32* %a, i64 %i
%tmp2 = load i32, i32* %tmp1, align 8
%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
br i1 %cond, label %for.body, label %for.end

Expand Down Expand Up @@ -181,7 +181,7 @@ for.body:
%tmp4 = load i32, i32* %tmp2, align 8
%tmp5 = add i32 %tmp3, %tmp4
%tmp6 = add i32 %tmp0, %tmp5
%i.next = add nuw nsw i64 %i, -1
%i.next = add nsw i64 %i, -1
%cond = icmp sgt i64 %i.next, 0
br i1 %cond, label %for.body, label %for.end

Expand Down

0 comments on commit ff20ee3

Please sign in to comment.