Fix bogus operand predicate on iq2000
The iq2000-elf port regressed these tests recently: > iq2000-sim: gcc.c-torture/execute/20040703-1.c -O2 (test for excess errors) > iq2000-sim: gcc.c-torture/execute/20040703-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) > iq2000-sim: gcc.c-torture/execute/20040703-1.c -O3 -g (test for excess errors) It turns out one of the patterns had an operand predicate that allowed REG, SUBREG, CONST_INT (with a limited set of CONST_INTs). Yet the constraint only allowed the limited set of immediates. This naturally triggered an LRA constraint failure. The fix is trivial, create an operand predicate that accurately reflects the kinds of operands allowed by the instruction. It turns out this was a long standing bug -- fixing the pattern resolved 55 failing tests in the testsuite. gcc/ * config/iq2000/predicates.md (uns_arith_constant): New predicate. * config/iq2000/iq2000.md (rotrsi3): Use it.
Please register or sign in to comment