Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296638

RISC-V: NegVI node emits wrong code when vector element basic type is T_BYTE/T_SHORT

XMLWordPrintable

    • b24
    • riscv
    • linux

      test/jdk/jdk/incubator/vector/Byte256VectorTests.java fails on riscv with the following error:
      ```
      test Byte256VectorTests.negByte256VectorTests (byte [i * 5]): failure
      java.lang.AssertionError: at index #2, input = 10 expected [-10] but found [-11]
      ```

      Currently, `NegVI` can only handle the vector element basic type `T_INT` with`vsetvli(t0, x0, Assembler::e32)` but `T_SHORT/T_BYTE` can also be matched with `NegVI`, so these two types of tests are currently failing:
      `test/jdk/jdk/incubator/vector/Byte*VectorTests.java`
      `test/jdk/jdk/incubator/vector/Short*VectorTests.java`

            dzhang Dingli Zhang
            dzhang Dingli Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: