Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
test/Isl/CodeGen/blas_sscal_simplified.ll
- This file was added.
; RUN: opt %loadPolly %defaultOpts -polly-codegen-isl < %s | |||||
; | |||||
; int sscal(int n, float sa, float *sx) { | |||||
; for(int i=0; i<n; i++, sx++) | |||||
; *sx *= sa; | |||||
; return 0; | |||||
; } | |||||
; | |||||
grosser: It is unclear what is tested in this test case. I assume this is the test case that broke… | |||||
jdoerfertAuthorUnsubmitted Not Done ReplyInline ActionsI will add something. jdoerfert: I will add something. | |||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |||||
define i32 @sscal(i32 %n, float %sa, float* %sx) { | |||||
entry: | |||||
br label %entry.split | |||||
entry.split: ; preds = %entry | |||||
%cmp1 = icmp sgt i32 %n, 0 | |||||
br i1 %cmp1, label %for.body.lr.ph, label %for.end | |||||
for.body.lr.ph: ; preds = %entry.split | |||||
%0 = zext i32 %n to i64 | |||||
br label %for.body | |||||
for.body: ; preds = %for.body.lr.ph, %for.body | |||||
%indvar = phi i64 [ 0, %for.body.lr.ph ], [ %indvar.next, %for.body ] | |||||
%sx.addr.02 = getelementptr float* %sx, i64 %indvar | |||||
%tmp = load float* %sx.addr.02, align 4 | |||||
%mul = fmul float %tmp, %sa | |||||
store float %mul, float* %sx.addr.02, align 4 | |||||
%indvar.next = add i64 %indvar, 1 | |||||
%exitcond = icmp ne i64 %indvar.next, %0 | |||||
br i1 %exitcond, label %for.body, label %for.cond.for.end_crit_edge | |||||
for.cond.for.end_crit_edge: ; preds = %for.body | |||||
br label %for.end | |||||
for.end: ; preds = %for.cond.for.end_crit_edge, %entry.split | |||||
ret i32 0 | |||||
} |
It is unclear what is tested in this test case. I assume this is the test case that broke previously. Could you add a comment to it to explain why it failed before. Something like.
This test case segfaulted previously due to us not properly supporting load instructions followed by zexts in the
run-time condition.
(Please replace by the actual problem)