aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.md8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98079.c13
2 files changed, 19 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 7c25ae2..76e9499 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -10184,7 +10184,8 @@
(abs:SDWIM
(match_operand:SDWIM 1 "general_operand")))
(clobber (reg:CC FLAGS_REG))])]
- "TARGET_CMOVE"
+ "TARGET_CMOVE
+ && (<MODE>mode != QImode || !TARGET_PARTIAL_REG_STALL)"
{
if (TARGET_EXPAND_ABS)
{
@@ -10257,6 +10258,7 @@
(match_operand:SWI 1 "general_operand")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_CMOVE
+ && (<MODE>mode != QImode || !TARGET_PARTIAL_REG_STALL)
&& ix86_pre_reload_split ()"
"#"
"&& 1"
@@ -18972,7 +18974,8 @@
(match_operand:SDWIM 1 "register_operand")
(match_operand:SDWIM 2 "general_operand")))
(clobber (reg:CC FLAGS_REG))])]
- "TARGET_CMOVE")
+ "TARGET_CMOVE
+ && (<MODE>mode != QImode || !TARGET_PARTIAL_REG_STALL)")
(define_insn_and_split "*<code><dwi>3_doubleword"
[(set (match_operand:<DWI> 0 "register_operand")
@@ -19039,6 +19042,7 @@
(match_operand:SWI 2 "general_operand")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_CMOVE
+ && (<MODE>mode != QImode || !TARGET_PARTIAL_REG_STALL)
&& ix86_pre_reload_split ()"
"#"
"&& 1"
diff --git a/gcc/testsuite/gcc.target/i386/pr98079.c b/gcc/testsuite/gcc.target/i386/pr98079.c
new file mode 100644
index 0000000..8de0ec3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98079.c
@@ -0,0 +1,13 @@
+/* PR target/98079 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -march=pentium3" } */
+
+typedef __UINT8_TYPE__ uint8_t;
+
+uint8_t foo (uint8_t x)
+{
+ if (x & 0x80)
+ x = -x;
+
+ return x;
+}