-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
; REQUIRES: asserts | ||
; RUN: not --crash opt -passes=loop-vectorize -mtriple=riscv64 -mattr=+v -disable-output %s | ||
|
||
define void @test(ptr %p, i64 %a, i8 %b) { | ||
entry: | ||
br label %for.cond | ||
|
||
for.cond: ; preds = %for.body, %entry | ||
%iv = phi i32 [ 0, %entry ], [ %add, %for.body ] | ||
%add = add i32 %iv, 1 | ||
%cmp.slt = icmp slt i32 %iv, 2 | ||
%shl = shl i64 %a, 48 | ||
%ashr = ashr i64 %shl, 52 | ||
%trunc.i32 = trunc i64 %ashr to i32 | ||
br i1 %cmp.slt, label %cond.false, label %for.body | ||
|
||
cond.false: ; preds = %for.cond | ||
%zext = zext i8 %b to i32 | ||
br label %for.body | ||
|
||
for.body: ; preds = %cond.false, %for.cond | ||
%cond = phi i32 [ %trunc.i32, %for.cond ], [ %zext, %cond.false ] | ||
%shl.i32 = shl i32 %cond, 8 | ||
%trunc = trunc i32 %shl.i32 to i8 | ||
store i8 %trunc, ptr %p, align 1 | ||
%cmp = icmp slt i32 %iv, 2 | ||
br i1 %cmp, label %for.cond, label %exit | ||
|
||
exit: ; preds = %for.body | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
; REQUIRES: asserts | ||
; RUN: not --crash opt -passes=loop-vectorize -mtriple=s390x -mcpu=z14 -disable-output %s | ||
|
||
define void @test(ptr %p, i40 %a) { | ||
entry: | ||
br label %for.body | ||
|
||
for.body: ; preds = %for.body, %entry | ||
%iv = phi i32 [ 0, %entry ], [ %iv.next, %for.body ] | ||
%shl = shl i40 %a, 24 | ||
%ashr = ashr i40 %shl, 28 | ||
%trunc = trunc i40 %ashr to i32 | ||
%icmp.eq = icmp eq i32 %trunc, 0 | ||
%zext = zext i1 %icmp.eq to i32 | ||
%icmp.ult = icmp ult i32 0, %zext | ||
%or = or i1 %icmp.ult, true | ||
%icmp.sgt = icmp sgt i1 %or, false | ||
store i1 %icmp.sgt, ptr %p, align 1 | ||
%iv.next = add i32 %iv, 1 | ||
%cond = icmp ult i32 %iv.next, 10 | ||
br i1 %cond, label %for.body, label %exit | ||
|
||
exit: ; preds = %for.body | ||
ret void | ||
} |