mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	static cast: simplify
This commit is contained in:
		
							parent
							
								
									6bf75be73b
								
							
						
					
					
						commit
						429d37ff41
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -3484,6 +3484,13 @@ replace_fcall_later:;
 | 
			
		|||
				}
 | 
			
		||||
			}
 | 
			
		||||
			break;
 | 
			
		||||
		case AST_CAST_SIZE:
 | 
			
		||||
			if (children.at(0)->type == AST_CONSTANT && children.at(1)->type == AST_CONSTANT) {
 | 
			
		||||
				int width = children[0]->bitsAsConst().as_int();
 | 
			
		||||
				RTLIL::Const val = children[1]->bitsAsConst(width);
 | 
			
		||||
				newNode = mkconst_bits(val.bits, children[1]->is_signed);
 | 
			
		||||
			}
 | 
			
		||||
			break;
 | 
			
		||||
		case AST_CONCAT:
 | 
			
		||||
			string_op = !children.empty();
 | 
			
		||||
			for (auto it = children.begin(); it != children.end(); it++) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue