File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed 
include/mlir/Dialect/Utils Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change 2424
2525namespace mlir {
2626
27- // / Return true if `v` is an IntegerAttr with value `0` of a ConstantIndexOp
28- // / with attribute with value `0`.
27+ /// Return true if `v` is an IntegerAttr with value `0`.
2928bool isZeroIndex(OpFoldResult v);
3029
31- // / Return true if `v` is an IntegerAttr with value `1` of a ConstantIndexOp
32- // / with attribute with value `1`.
30+ /// Return true if `v` is an IntegerAttr with value `1`.
3331bool isOneIndex(OpFoldResult v);
3432
3533/// Represents a range (offset, size, and stride) where each element of the
Original file line number Diff line number Diff line change 1515
1616namespace mlir {
1717
18- bool isZeroIndex(OpFoldResult v) {
19-   if (!v)
20-     return false;
21-   return isConstantIntValue(v, 0);
22- }
18+ bool isZeroIndex(OpFoldResult v) { return isConstantIntValue(v, 0); }
2319
24- bool isOneIndex(OpFoldResult v) {
25-   if (!v)
26-     return false;
27-   return isConstantIntValue(v, 1);
28- }
20+ bool isOneIndex(OpFoldResult v) { return isConstantIntValue(v, 1); }
2921
3022std::tuple<SmallVector<OpFoldResult>, SmallVector<OpFoldResult>,
3123           SmallVector<OpFoldResult>>
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments