(define_expand "abs<mode>2"
[(parallel
- [(set (match_operand:SWI48DWI 0 "register_operand")
- (abs:SWI48DWI
- (match_operand:SWI48DWI 1 "general_operand")))
+ [(set (match_operand:SDWIM 0 "register_operand")
+ (abs:SDWIM
+ (match_operand:SDWIM 1 "general_operand")))
(clobber (reg:CC FLAGS_REG))])]
"TARGET_CMOVE"
{
})
(define_insn_and_split "*abs<mode>2_1"
- [(set (match_operand:SWI48 0 "register_operand")
- (abs:SWI48
- (match_operand:SWI48 1 "general_operand")))
+ [(set (match_operand:SWI 0 "register_operand")
+ (abs:SWI
+ (match_operand:SWI 1 "general_operand")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_CMOVE
&& ix86_pre_reload_split ()"
[(parallel
[(set (reg:CCGOC FLAGS_REG)
(compare:CCGOC
- (neg:SWI48 (match_dup 1))
+ (neg:SWI (match_dup 1))
(const_int 0)))
(set (match_dup 2)
- (neg:SWI48 (match_dup 1)))])
+ (neg:SWI (match_dup 1)))])
(set (match_dup 0)
- (if_then_else:SWI48
+ (if_then_else:SWI
(ge (reg:CCGOC FLAGS_REG) (const_int 0))
(match_dup 2)
(match_dup 1)))]
(define_expand "<code><mode>3"
[(parallel
- [(set (match_operand:SWI48DWI 0 "register_operand")
- (maxmin:SWI48DWI
- (match_operand:SWI48DWI 1 "register_operand")
- (match_operand:SWI48DWI 2 "general_operand")))
+ [(set (match_operand:SDWIM 0 "register_operand")
+ (maxmin:SDWIM
+ (match_operand:SDWIM 1 "register_operand")
+ (match_operand:SDWIM 2 "general_operand")))
(clobber (reg:CC FLAGS_REG))])]
"TARGET_CMOVE")
})
(define_insn_and_split "*<code><mode>3_1"
- [(set (match_operand:SWI48 0 "register_operand")
- (maxmin:SWI48
- (match_operand:SWI48 1 "register_operand")
- (match_operand:SWI48 2 "general_operand")))
+ [(set (match_operand:SWI 0 "register_operand")
+ (maxmin:SWI
+ (match_operand:SWI 1 "register_operand")
+ (match_operand:SWI 2 "general_operand")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_CMOVE
&& ix86_pre_reload_split ()"
"#"
"&& 1"
[(set (match_dup 0)
- (if_then_else:SWI48 (match_dup 3)
+ (if_then_else:SWI (match_dup 3)
(match_dup 1)
(match_dup 2)))]
{
--- /dev/null
+/* PR target/97873 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2 -mno-sse3 -mtune=generic" } */
+
+short test_absw (short x)
+{
+ return (x < 0) ? -x : x;
+}
+
+short test_sminw (short x, short y)
+{
+ return (x < y) ? x : y;
+}
+
+/* { dg-final { scan-assembler-not "movswl" } } */
+
+char test_absb (char x)
+{
+ return (x < 0) ? -x : x;
+}
+
+char test_sminb (char x, char y)
+{
+ return (x < y) ? x : y;
+}
+
+/* { dg-final { scan-assembler-not "movsbl" } } */