]> git.ipfire.org Git - thirdparty/gcc.git/commit
fix PR 111259 invalid zcmp mov predicate.
authorFei Gao <gaofei@eswincomputing.com>
Fri, 15 Sep 2023 01:20:08 +0000 (01:20 +0000)
committerPatrick O'Neill <patrick@rivosinc.com>
Fri, 15 Sep 2023 20:43:10 +0000 (13:43 -0700)
commitd7b6020276a843e97f6135259b4ab3b53a5850e2
tree3902fefcf94b0f42e4a86c60752555294c3800b8
parentfd5a858eb5ef93c4ac7b0399b67d46805d2dabec
fix PR 111259 invalid zcmp mov predicate.

The code changes are from Palmer.

root cause:
In a gcc build with --enable-checking=yes, REGNO (op) checks
rtx code and expected code 'reg'. so a rtx with 'subreg' causes
an internal compiler error.

solution:
Restrict predicate to allow 'reg' only.

gcc/ChangeLog:

* config/riscv/predicates.md: Restrict predicate
to allow 'reg' only.
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
gcc/config/riscv/predicates.md