[all-commits] [llvm/llvm-project] c8318b: [RISCV] Fix canonical ordering of s* vs z* extensi...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Tue Apr 18 23:05:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8318b973ad0414a068f4b5025a896d912554a11
      https://github.com/llvm/llvm-project/commit/c8318b973ad0414a068f4b5025a896d912554a11
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2023-04-19 (Wed, 19 Apr 2023)

  Changed paths:
    M llvm/lib/Support/RISCVISAInfo.cpp
    M llvm/unittests/Support/RISCVISAInfoTest.cpp

  Log Message:
  -----------
  [RISCV] Fix canonical ordering of s* vs z* extensions in RISCVISAInfo

As noted in https://reviews.llvm.org/D148315, the ordering logic for
OrderedExtensionMap currently puts s* before z* extensions, but per the
ISA manual the correct order should be z* and then s* (with the
exception of zxm*, which are ordered after s*).

This patch fixes the ordering and adds a TODO for zxm*. The changes are
visible in the test case added in
a35e67fc5be654a7efdfa6125343b90f8960a487 which also demonstrates an
issue with the ordering of single letter extensions (which isn't
addressed in this patch).

This ordering matches the one used by GCC/binutils as well.

Differential Revision: https://reviews.llvm.org/D148615




More information about the All-commits mailing list