When there is not RISCV arch attribute in assembly .s file, it will not generate arch attribute in obj file. LLVM asm parser does not use subtarget feature bits to generate appropriate attributes. So instructions can not be recognized in disassemble process (llvm-objdump).
For example,
;t.s fadd.s ft1,ft2,ft3
./bin/llvm-mc < t.s -mattr=+f -filetype=obj |./bin/llvm-objdump -dr -
0000000000000000 <.text>: 0: d3 70 31 00 <unknown>
Emit target attribute at the constructor of RISCV asm parser to enable the functionality of attribute section even in assemble process.
It's a WIP patch to discuss and see whether the direction is right.
So, this used to be required until D58932. I guess it's fine to remove it from the llvm-mc invocation (though this one fails to delete one of the spaces); the alternative would be to add --mattr=-f to the llvm-objdump invocation, but I think this diff makes more sense.