From 1e0d0ec3ffb457ff718d437c50f4e89d229a50ed Mon Sep 17 00:00:00 2001 From: Pengcheng Wang Date: Sun, 27 Apr 2025 14:17:52 +0800 Subject: [PATCH 1/2] [RISCV][NFC] Remove attributes in pr107950.ll There exists some stale experimental features and the llc complains it. We can simply remove these attributes and add the desired features in `-mattr`. --- llvm/test/CodeGen/RISCV/rvv/pr107950.ll | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/llvm/test/CodeGen/RISCV/rvv/pr107950.ll b/llvm/test/CodeGen/RISCV/rvv/pr107950.ll index 9d93ed3172132..9e3e56e9eb883 100644 --- a/llvm/test/CodeGen/RISCV/rvv/pr107950.ll +++ b/llvm/test/CodeGen/RISCV/rvv/pr107950.ll @@ -1,10 +1,10 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 -; RUN: llc < %s -verify-machineinstrs | FileCheck %s +; RUN: llc -mattr=+v < %s -verify-machineinstrs | FileCheck %s target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128" target triple = "riscv64-unknown-linux-gnu" -define void @m( %0) #0 { +define void @m( %0) { ; CHECK-LABEL: m: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, mu @@ -23,8 +23,4 @@ entry: ret void } -; Function Attrs: nocallback nofree nosync nounwind willreturn memory(read) -declare @llvm.masked.gather.nxv4i32.nxv4p0(, i32 immarg, , ) #1 - -attributes #0 = { "target-features"="+64bit,+d,+f,+relax,+v,+xsifivecdiscarddlone,+zicsr,+zve32f,+zve32x,+zve64d,+zve64f,+zve64x,+zvl128b,+zvl32b,+zvl64b,-a,-b,-c,-e,-experimental-smctr,-smmpm,-smnpm,-experimental-ssctr,-ssnpm,-sspm,-supm,-experimental-zacas,-experimental-zalasr,-experimental-zicfilp,-experimental-zicfiss,-experimental-zvbc32e,-experimental-zvkgs,-h,-m,-shcounterenw,-shgatpa,-shtvala,-shvsatpa,-shvstvala,-shvstvecd,-smaia,-smcdeleg,-smcsrind,-smepmp,-smstateen,-ssaia,-ssccfg,-ssccptr,-sscofpmf,-sscounterenw,-sscsrind,-ssqosid,-ssstateen,-ssstrict,-sstc,-sstvala,-sstvecd,-ssu64xl,-svade,-svadu,-svbare,-svinval,-svnapot,-svpbmt,-xcvalu,-xcvbi,-xcvbitmanip,-xcvelw,-xcvmac,-xcvmem,-xcvsimd,-xsfcease,-xsfvcp,-xsfvfnrclipxfqf,-xsfvfwmaccqqq,-xsfvqmaccdod,-xsfvqmaccqoq,-xsifivecflushdlone,-xtheadba,-xtheadbb,-xtheadbs,-xtheadcmo,-xtheadcondmov,-xtheadfmemidx,-xtheadmac,-xtheadmemidx,-xtheadmempair,-xtheadsync,-xtheadvdot,-xventanacondops,-xwchc,-za128rs,-za64rs,-zaamo,-zabha,-zalrsc,-zama16b,-zawrs,-zba,-zbb,-zbc,-zbkb,-zbkc,-zbkx,-zbs,-zca,-zcb,-zcd,-zce,-zcf,-zcmop,-zcmp,-zcmt,-zdinx,-zfa,-zfbfmin,-zfh,-zfhmin,-zfinx,-zhinx,-zhinxmin,-zic64b,-zicbom,-zicbop,-zicboz,-ziccamoa,-ziccif,-zicclsm,-ziccrse,-zicntr,-zicond,-zifencei,-zihintntl,-zihintpause,-zihpm,-zimop,-zk,-zkn,-zknd,-zkne,-zknh,-zkr,-zks,-zksed,-zksh,-zkt,-zmmul,-ztso,-zvbb,-zvbc,-zvfbfmin,-zvfbfwma,-zvfh,-zvfhmin,-zvkb,-zvkg,-zvkn,-zvknc,-zvkned,-zvkng,-zvknha,-zvknhb,-zvks,-zvksc,-zvksed,-zvksg,-zvksh,-zvkt,-zvl1024b,-zvl16384b,-zvl2048b,-zvl256b,-zvl32768b,-zvl4096b,-zvl512b,-zvl65536b,-zvl8192b" } -attributes #1 = { nocallback nofree nosync nounwind willreturn memory(read) } +declare @llvm.masked.gather.nxv4i32.nxv4p0(, i32 immarg, , ) From 656eee299f3dcb50e3718a5e07f90266e775e1b8 Mon Sep 17 00:00:00 2001 From: Pengcheng Wang Date: Sun, 27 Apr 2025 19:11:31 +0800 Subject: [PATCH 2/2] Remove declaration --- llvm/test/CodeGen/RISCV/rvv/pr107950.ll | 2 -- 1 file changed, 2 deletions(-) diff --git a/llvm/test/CodeGen/RISCV/rvv/pr107950.ll b/llvm/test/CodeGen/RISCV/rvv/pr107950.ll index 9e3e56e9eb883..002dfe41ff244 100644 --- a/llvm/test/CodeGen/RISCV/rvv/pr107950.ll +++ b/llvm/test/CodeGen/RISCV/rvv/pr107950.ll @@ -22,5 +22,3 @@ entry: store i32 %1, ptr null, align 4 ret void } - -declare @llvm.masked.gather.nxv4i32.nxv4p0(, i32 immarg, , )