[PATCH] D95281: [RISCV] Add the `vfneg` alias test
Evandro Menezes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 17:51:42 PST 2021
evandro updated this revision to Diff 318708.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95281/new/
https://reviews.llvm.org/D95281
Files:
llvm/lib/Target/RISCV/RISCVInstrInfoV.td
llvm/test/MC/RISCV/rvv/sign-injection.s
Index: llvm/test/MC/RISCV/rvv/sign-injection.s
===================================================================
--- llvm/test/MC/RISCV/rvv/sign-injection.s
+++ llvm/test/MC/RISCV/rvv/sign-injection.s
@@ -82,3 +82,16 @@
# CHECK-ENCODING: [0x57,0x54,0x45,0x2a]
# CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
# CHECK-UNKNOWN: 57 54 45 2a <unknown>
+
+vfneg.v v8, v4, v0.t
+# CHECK-INST: vfneg.v v8, v4, v0.t
+# CHECK-ENCODING: [0x57,0x14,0x42,0x24]
+# CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
+# CHECK-UNKNOWN: 57 14 42 24 <unknown>
+
+vfneg.v v8, v4
+# CHECK-INST: vfsgnjn.vv v8, v4, v4
+# CHECK-ENCODING: [0x57,0x14,0x42,0x26]
+# CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
+# CHECK-UNKNOWN: 57 14 42 26 <unknown>
+
Index: llvm/lib/Target/RISCV/RISCVInstrInfoV.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfoV.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfoV.td
@@ -794,6 +794,9 @@
defm VFSGNJN_V : VALU_FV_V_F<"vfsgnjn", 0b001001>;
defm VFSGNJX_V : VALU_FV_V_F<"vfsgnjx", 0b001010>;
+def : InstAlias<"vfneg.v $vd, $vs$vm",
+ (VFSGNJN_VV VR:$vd, VR:$vs, VR:$vs, VMaskOp:$vm)>;
+
// Vector Floating-Point Compare Instructions
let RVVConstraint = NoConstraint in {
defm VMFEQ_V : VALU_FV_V_F<"vmfeq", 0b011000>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95281.318708.patch
Type: text/x-patch
Size: 1373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210123/9d73b020/attachment.bin>
More information about the llvm-commits
mailing list