aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2019-11-10 12:53:31 +0100
committerSegher Boessenkool <segher@gcc.gnu.org>2019-11-10 12:53:31 +0100
commit7964e40de3b03a27d981b47110ebabce082220a4 (patch)
tree4dccd26462cc47abbbdb45d8b7019371eff94e1b /gcc
parent6cf67b62c8cda035dccaca2ae6ff94d560b37a6f (diff)
downloadgcc-7964e40de3b03a27d981b47110ebabce082220a4.zip
gcc-7964e40de3b03a27d981b47110ebabce082220a4.tar.gz
gcc-7964e40de3b03a27d981b47110ebabce082220a4.tar.bz2
rs6000: Allow any CC mode in movcc
Sometimes combine wants to do a move in CCFPmode, but we don't currently handle moves in any CC mode other than CCmode. Fix that oversight. * config/rs6000/rs6000.md (CC_any): New mode iterator. (*movcc_internal1): Rename to... (*movcc_<mode> for CC_any): ... this. Support moves of all CC modes. From-SVN: r278017
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.md16
2 files changed, 15 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 280f878..a4beddc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-11-10 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000.md (CC_any): New mode iterator.
+ (*movcc_internal1): Rename to...
+ (*movcc_<mode> for CC_any): ... this. Support moves of all CC modes.
+
2019-11-09 Jan Hubicka <hubicka@ucw.cz>
* cgraph.h (struct cgraph_node): Add ipcp_clone flag.
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index fb18681..37689bd 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -7220,13 +7220,15 @@
""
"")
-(define_insn "*movcc_internal1"
- [(set (match_operand:CC 0 "nonimmediate_operand"
- "=y,x,?y,y,r,r,r,r, r,*c*l,r,m")
- (match_operand:CC 1 "general_operand"
- " y,r, r,O,x,y,r,I,*h, r,m,r"))]
- "register_operand (operands[0], CCmode)
- || register_operand (operands[1], CCmode)"
+(define_mode_iterator CC_any [CC CCUNS CCEQ CCFP])
+
+(define_insn "*movcc_<mode>"
+ [(set (match_operand:CC_any 0 "nonimmediate_operand"
+ "=y,x,?y,y,r,r,r,r, r,*c*l,r,m")
+ (match_operand:CC_any 1 "general_operand"
+ " y,r, r,O,x,y,r,I,*h, r,m,r"))]
+ "register_operand (operands[0], <MODE>mode)
+ || register_operand (operands[1], <MODE>mode)"
"@
mcrf %0,%1
mtcrf 128,%1