mirror of git://gcc.gnu.org/git/gcc.git
				
				
				
			PR target/78748: S/390: Fix ICE with ANDC splitter.
gcc/ChangeLog:
2016-12-19  Dominik Vogt  <vogt@linux.vnet.ibm.com>
	PR target/78748
	* config/s390/s390.md ("*andc_split_<mode>"): Allow memory destination
	only if it coincides with operand 2.
gcc/testsuite/ChangeLog:
2016-12-19  Dominik Vogt  <vogt@linux.vnet.ibm.com>
	PR target/78748
	* gcc.c-torture/compile/pr78748.c: New test.
From-SVN: r243793
			
			
This commit is contained in:
		
							parent
							
								
									e01f223f28
								
							
						
					
					
						commit
						ad7ab32ed4
					
				|  | @ -1,3 +1,9 @@ | ||||||
|  | 2016-12-19  Dominik Vogt  <vogt@linux.vnet.ibm.com> | ||||||
|  | 
 | ||||||
|  | 	PR target/78748 | ||||||
|  | 	* config/s390/s390.md ("*andc_split_<mode>"): Allow memory destination | ||||||
|  | 	only if it coincides with operand 2. | ||||||
|  | 
 | ||||||
| 2016-12-19  Dominik Vogt  <vogt@linux.vnet.ibm.com> | 2016-12-19  Dominik Vogt  <vogt@linux.vnet.ibm.com> | ||||||
| 
 | 
 | ||||||
| 	* combine.c (change_zero_ext): Skip generation of redundant AND. | 	* combine.c (change_zero_ext): Skip generation of redundant AND. | ||||||
|  |  | ||||||
|  | @ -7420,7 +7420,11 @@ | ||||||
| 	(and:GPR (not:GPR (match_operand:GPR 1 "nonimmediate_operand" "")) | 	(and:GPR (not:GPR (match_operand:GPR 1 "nonimmediate_operand" "")) | ||||||
| 		 (match_operand:GPR 2 "general_operand" ""))) | 		 (match_operand:GPR 2 "general_operand" ""))) | ||||||
|    (clobber (reg:CC CC_REGNUM))] |    (clobber (reg:CC CC_REGNUM))] | ||||||
|   "! reload_completed && s390_logical_operator_ok_p (operands)" |   "! reload_completed | ||||||
|  |    && (GET_CODE (operands[0]) != MEM | ||||||
|  |       /* Ensure that s390_logical_operator_ok_p will succeed even | ||||||
|  | 	 on the split xor if (b & a) is stored into a pseudo.  */ | ||||||
|  |        || rtx_equal_p (operands[0], operands[2]))" | ||||||
|   "#" |   "#" | ||||||
|   "&& 1" |   "&& 1" | ||||||
|   [ |   [ | ||||||
|  |  | ||||||
|  | @ -1,3 +1,8 @@ | ||||||
|  | 2016-12-19  Dominik Vogt  <vogt@linux.vnet.ibm.com> | ||||||
|  | 
 | ||||||
|  | 	PR target/78748 | ||||||
|  | 	* gcc.c-torture/compile/pr78748.c: New test. | ||||||
|  | 
 | ||||||
| 2016-12-18  Janus Weil  <janus@gcc.gnu.org> | 2016-12-18  Janus Weil  <janus@gcc.gnu.org> | ||||||
| 
 | 
 | ||||||
| 	PR fortran/78848 | 	PR fortran/78848 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,14 @@ | ||||||
|  | /* PR target/78748 */ | ||||||
|  | /* { dg-options "-march=zEC12" { target { s390*-*-* } } } */ | ||||||
|  | 
 | ||||||
|  | void | ||||||
|  | foo (int *p, int *q) | ||||||
|  | { | ||||||
|  |   *q = *p & ~*q; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void | ||||||
|  | bar (int *p, int *q) | ||||||
|  | { | ||||||
|  |   *q = ~*p & *q; | ||||||
|  | } | ||||||
		Loading…
	
		Reference in New Issue
	
	 Dominik Vogt
						Dominik Vogt