projects
/
platform
/
upstream
/
isl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
isl_mat_scale_down: avoid trampling over aliased matrices
[platform/upstream/isl.git]
/
isl_mat.c
diff --git
a/isl_mat.c
b/isl_mat.c
index
90e981f
..
4e6315c
100644
(file)
--- a/
isl_mat.c
+++ b/
isl_mat.c
@@
-1441,6
+1441,10
@@
__isl_give isl_mat *isl_mat_scale_down(__isl_take isl_mat *mat, isl_int m)
{
int i;
+ if (isl_int_is_one(m))
+ return mat;
+
+ mat = isl_mat_cow(mat);
if (!mat)
return NULL;