diff options
author | Pan Li <pan2.li@intel.com> | 2023-05-14 16:15:11 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-05-14 17:03:25 +0800 |
commit | 1871740c7803c2aea20f651f57b413bc425a051c (patch) | |
tree | c4f8a0f3b6dc48ca16adf37df2bec86711f7b482 /libgcc | |
parent | c34cede1f2ade4081b5aa72e01ba74d88d1e617f (diff) | |
download | gcc-1871740c7803c2aea20f651f57b413bc425a051c.zip gcc-1871740c7803c2aea20f651f57b413bc425a051c.tar.gz gcc-1871740c7803c2aea20f651f57b413bc425a051c.tar.bz2 |
RISC-V: Refactor the or pattern to switch cases
This patch refactor the pattern A or B or C or D, to the switch case for
easy add/remove new types, as well as human reading friendly.
Before this patch:
return A || B || C || D;
After this patch:
switch (type)
{
case A:
case B:
case C:
case D:
return true;
default:
return false;
}
Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/ChangeLog:
* config/riscv/riscv-vector-builtins.cc (required_extensions_p):
Refactor the or pattern to switch cases.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions