2001-10-10 Richard Henderson <rth@redhat.com>
- * combine.c (try_combine): Handle a SEQUENCE of one insn.
+ * combine.c (try_combine): Handle a SEQUENCE of one insn.
+
+ * i386.c (test splitter): Narrow tests vs paradoxical subregs.
+ (jcc splitters): Add two splitters to simplify compound compares
+ that simplify_comparison can't handle.
2001-10-10 Richard Henderson <rth@redhat.com>
2001-10-08 Richard Henderson <rth@redhat.com>
- * i386.md (movsi_xor): Export.
- (setcc peep2): Use it when available; add an alternative to
+ * i386.md (movsi_xor): Export.
+ (setcc peep2): Use it when available; add an alternative to
match zero_extendhisi2_and.
2001-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2001-10-06 Ulrich Weigand <uweigand@de.ibm.com>
- * config/s390/s390.c (s390_va_arg): Use set_mem_alias_set.
+ * config/s390/s390.c (s390_va_arg): Use set_mem_alias_set.
2001-10-05 Joseph S. Myers <jsm28@cam.ac.uk>
2001-10-05 Catherine Moore <clm@redhat.com>
- * config/stormy16/stormy-abi: Document abi changes.
- * config/stormy16/stormy16.h (REG_ALLOC_ORDER): Redefine.
- (ICALL_REGS): New register class.
- (NUM_ARGUMENT_REGISTERS): Now 6.
- (DEFAULT_PCC_STRUCT_RETURN): Don't try to return structs
- in registers.
- (REG_CLASS_FROM_LETTER): Map 'z' to ICALL_REGS.
- * config/stormy16.md (call_internal, call_value_internal,
- indirect_jump): Use new 'z' constraint.
+ * config/stormy16/stormy-abi: Document abi changes.
+ * config/stormy16/stormy16.h (REG_ALLOC_ORDER): Redefine.
+ (ICALL_REGS): New register class.
+ (NUM_ARGUMENT_REGISTERS): Now 6.
+ (DEFAULT_PCC_STRUCT_RETURN): Don't try to return structs
+ in registers.
+ (REG_CLASS_FROM_LETTER): Map 'z' to ICALL_REGS.
+ * config/stormy16.md (call_internal, call_value_internal,
+ indirect_jump): Use new 'z' constraint.
2001-10-05 Neil Booth <neil@daikokuya.demon.co.uk>
storehps builtins.
* doc/extend.texi (Vector Extensions): New node.
* doc/invoke.texi (Machine Dependent Options): Add documentation for
- i386 -mmmx, -msse, -m3dnow.
+ i386 -mmmx, -msse, -m3dnow.
Sat Sep 29 15:08:16 CEST 2001 Jan Hubicka <jh@suse.cz>
HOST_WIDE_INT len = INTVAL (operands[1]);
HOST_WIDE_INT pos = INTVAL (operands[2]);
HOST_WIDE_INT mask;
- enum machine_mode mode;
+ enum machine_mode mode, submode;
mode = GET_MODE (operands[0]);
if (GET_CODE (operands[0]) == MEM)
operands[0] = adjust_address (operands[0], mode, 0);
}
}
+ else if (GET_CODE (operands[0]) == SUBREG
+ && (submode = GET_MODE (SUBREG_REG (operands[0])),
+ GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (submode))
+ && pos + len <= GET_MODE_BITSIZE (submode))
+ {
+ /* Narrow a paradoxical subreg to prevent partial register stalls. */
+ mode = submode;
+ operands[0] = SUBREG_REG (operands[0]);
+ }
else if (mode == HImode && pos + len <= 8)
{
/* Small HImode tests can be converted to QImode. */
(const_int 0)
(const_int 1)))])
+;; In general it is not safe to assume too much about CCmode registers,
+;; so simplify-rtx stops when it sees a second one. Under certain
+;; conditions this is safe on x86, so help combine not create
+;;
+;; seta %al
+;; testb %al, %al
+;; je Lfoo
+
+(define_split
+ [(set (pc)
+ (if_then_else (ne (match_operator 0 "ix86_comparison_operator"
+ [(reg 17) (const_int 0)])
+ (const_int 0))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))]
+ ""
+ [(set (pc)
+ (if_then_else (match_dup 0)
+ (label_ref (match_dup 1))
+ (pc)))]
+{
+ PUT_MODE (operands[0], VOIDmode);
+})
+
+(define_split
+ [(set (pc)
+ (if_then_else (eq (match_operator 0 "ix86_comparison_operator"
+ [(reg 17) (const_int 0)])
+ (const_int 0))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))]
+ ""
+ [(set (pc)
+ (if_then_else (match_dup 0)
+ (label_ref (match_dup 1))
+ (pc)))]
+{
+ rtx new_op0 = copy_rtx (operands[0]);
+ operands[0] = new_op0;
+ PUT_MODE (new_op0, VOIDmode);
+ PUT_CODE (new_op0, REVERSE_CONDITION (GET_CODE (new_op0),
+ GET_MODE (XEXP (new_op0, 0))));
+
+ /* Make sure that (a) the CCmode we have for the flags is strong
+ enough for the reversed compare or (b) we have a valid FP compare. */
+ if (! ix86_comparison_operator (new_op0, VOIDmode))
+ FAIL;
+})
+
;; Define combination compare-and-branch fp compare instructions to use
;; during early optimization. Splitting the operation apart early makes
;; for bad code when we want to reverse the operation.