Add simm7fp/mimmfp to represent floating point immediate values.
Also clean multiclasses to define floating point arithmetic instructions
to handle simm7fp/mimmfp operands. Also add several regression tests
for new operands.
Details
- Reviewers
simoll k-ishizaka - Commits
- rG0314e8980fba: [VE] Support floating point immediate values
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks! Minor comments inline.
llvm/lib/Target/VE/VEInstrInfo.td | ||
---|---|---|
100 | Could you document the purpose of this constant with a comment? | |
107 | Maybe cache the Imm.getSExtValue() result as done above and use that variable instead. | |
458 | same as below | |
465 | I suppose you could write this more naturally as multiclass RRNCm<...> : RRNCbm<...>; | |
llvm/test/CodeGen/VE/fp_mul.ll | ||
97 | I guess this is one of those cases where it makes sense to use a fp hex constant: it is shorter and the expected output relates to the bitencoding anyway. |
llvm/lib/Target/VE/VEInstrInfo.td | ||
---|---|---|
100 | Add it. Thanks. | |
107 | Did it. | |
458 | Did it. | |
465 | Did it. I've not know how to write it. Thanks! | |
llvm/test/CodeGen/VE/fp_mul.ll | ||
97 | I wish I could. Recently, llvm is modified to not use hex values in llvm-ir. After that, llc doesn't accept hex values when I tried to use hex values. Please let me know if you know how to write it in the current version. Thanks. |
llvm/test/CodeGen/VE/fp_mul.ll | ||
---|---|---|
97 | The IR in line 61 uses a hex fp constant. I'd expect this to work here too. |
llvm/test/CodeGen/VE/fp_mul.ll | ||
---|---|---|
97 | Yeah. That causes these errors. I tried them and I failed previously. If I try 0x007FFFFF: /usr/uhome/aurora/fccg/marukawa/llvm-dev/build-debug-upstream/bin/llc: error: /usr/uhome/aurora/fccg/marukawa/llvm-dev/build-debug-upstream/bin/llc: <stdin>:97:23: error: floating point constant invalid for type %r = fmul float %a, 0x007FFFFF If I try 0x007FFFFFFFFFFFFF: /usr/uhome/aurora/fccg/marukawa/llvm-dev/build-debug-upstream/bin/llc: error: /usr/uhome/aurora/fccg/marukawa/llvm-dev/build-debug-upstream/bin/llc: <stdin>:97:23: error: floating point constant invalid for type %r = fmul float %a, 0x007FFFFFFFFFFFFF |
LGTM, then. We should followup on the denormal fp constant issue (getting @arsenm in the loop who has been working on proper fp support).
llvm/test/CodeGen/VE/fp_mul.ll | ||
---|---|---|
97 | Apparently, LLVM does not like denormal hex fp constants. I suppose that should be considered a bug since it is still a valid fp specification. |
Could you document the purpose of this constant with a comment?