[polly] r271705 - [FIX] Fix potential issue related to subtraction from an unsigned 0 in circularShiftOutputDims
Roman Gareev via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 11:46:29 PDT 2016
Author: romangareev
Date: Fri Jun 3 13:46:29 2016
New Revision: 271705
URL: http://llvm.org/viewvc/llvm-project?rev=271705&view=rev
Log:
[FIX] Fix potential issue related to subtraction from an unsigned 0 in circularShiftOutputDims
Reported-by: Mehdi Amini <mehdi.amini at apple.com>
Contributed-by: Michael Kruse <llvm at meinersbur.de>
Differential Revision: http://reviews.llvm.org/D20969
Modified:
polly/trunk/lib/Transform/ScheduleOptimizer.cpp
Modified: polly/trunk/lib/Transform/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ScheduleOptimizer.cpp?rev=271705&r1=271704&r2=271705&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/Transform/ScheduleOptimizer.cpp Fri Jun 3 13:46:29 2016
@@ -463,8 +463,10 @@ static bool containsMatrMult(__isl_keep
///
/// @param IslMap The isl map to be modified.
static __isl_give isl_map *circularShiftOutputDims(__isl_take isl_map *IslMap) {
- auto InputDimsId = isl_map_get_tuple_id(IslMap, isl_dim_in);
auto DimNum = isl_map_dim(IslMap, isl_dim_out);
+ if (DimNum == 0)
+ return IslMap;
+ auto InputDimsId = isl_map_get_tuple_id(IslMap, isl_dim_in);
IslMap = isl_map_move_dims(IslMap, isl_dim_in, 0, isl_dim_out, DimNum - 1, 1);
IslMap = isl_map_move_dims(IslMap, isl_dim_out, 0, isl_dim_in, 0, 1);
return isl_map_set_tuple_id(IslMap, isl_dim_in, InputDimsId);
More information about the llvm-commits
mailing list