Skip to content

Commit 0beb70a

Browse files
sunshaoceGeneraluseAI
authored andcommitted
[MC][RISCV] Add missing Predicates for NDS_FMV_BF16_X (llvm#169662)
run ```shell build/bin/llvm-exegesis -mode=latency -mtriple=riscv64-unknown-linux-gnu --mcpu=generic --benchmark-phase=assemble-measured-code -opcode-index=-1 ``` error: ``` --- mode: latency key: instructions: - 'NDS_FMV_BF16_X F2_H X11' - 'NDS_FMV_X_BF16 X26 F2_H' config: '' register_initial_values: - 'X11=0x0' cpu_name: generic llvm_triple: riscv64-unknown-linux-gnu min_instructions: 10000 measurements: [] error: actual measurements skipped. info: Repeating two instructions assembled_snippet: 41116AE48145538105F0530D01E0538105F0530D01E0538105F0530D01E0538105F0530D01E0226D41018280 ... LLVM ERROR: Attempting to emit FMV_H_X instruction but the Feature_HasHalfFPLoadStoreMove predicate(s) are not met ```
1 parent 93ea77d commit 0beb70a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoXAndes.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,6 @@ def : Pat<(fpextend (bf16 FPR16:$rs)),
838838
(NDS_FCVT_S_BF16 (bf16 FPR16:$rs))>;
839839
def : Pat<(bf16 (fpround FPR32:$rs)),
840840
(NDS_FCVT_BF16_S FPR32:$rs)>;
841-
} // Predicates = [HasVendorXAndesBFHCvt]
842841

843842
let isCodeGenOnly = 1 in {
844843
def NDS_FMV_BF16_X : FPUnaryOp_r<0b1111000, 0b00000, 0b000, FPR16, GPR, "fmv.w.x">,
@@ -847,7 +846,6 @@ def NDS_FMV_X_BF16 : FPUnaryOp_r<0b1110000, 0b00000, 0b000, GPR, FPR16, "fmv.x.w
847846
Sched<[WriteFMovF32ToI32, ReadFMovF32ToI32]>;
848847
}
849848

850-
let Predicates = [HasVendorXAndesBFHCvt] in {
851849
def : Pat<(riscv_nds_fmv_bf16_x GPR:$src), (NDS_FMV_BF16_X GPR:$src)>;
852850
def : Pat<(riscv_nds_fmv_x_anyextbf16 (bf16 FPR16:$src)),
853851
(NDS_FMV_X_BF16 (bf16 FPR16:$src))>;

0 commit comments

Comments
 (0)