Skip to content

Commit 03e1eb2

Browse files
committed
[RISCV] Replace hasStdExtV with hasVInstructions.
This prevents excluding Zve*
1 parent 42326c7 commit 03e1eb2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
14791479
setTargetDAGCombine({ISD::UMAX, ISD::UMIN, ISD::SMAX, ISD::SMIN});
14801480

14811481
if ((Subtarget.hasStdExtZbs() && Subtarget.is64Bit()) ||
1482-
Subtarget.hasStdExtV())
1482+
Subtarget.hasVInstructions())
14831483
setTargetDAGCombine(ISD::TRUNCATE);
14841484

14851485
if (Subtarget.hasStdExtZbkb())

llvm/test/CodeGen/RISCV/rvv/trunc-select-to-max-usat.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
22
; RUN: llc < %s -mtriple=riscv64 -mattr=+v | FileCheck %s
3+
; RUN: llc < %s -mtriple=riscv64 -mattr=+zve64x,+zvl128b | FileCheck %s
34

45
define <4 x i8> @test_v4i16_v4i8(<4 x i16> %x) {
56
; CHECK-LABEL: test_v4i16_v4i8:

0 commit comments

Comments
 (0)