Add check for legal data types when expanding into a Newton series.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I think you forgot to add llvm-commits as a subscriber (that's what makes it get sent to the list, not the repository). Also tests.
WRT the tests, I'd appreciate some help. In some cases, lowering would fail because the square root was being expanded into the series for MVT::v4f64, which is obviously not supported by AArch64. I'm at a loss as to why such data type, unsupported by the target, percolated through to the backend.
Would concocting the bytecode using such data type be a sensible test?
On another note, as I'm not very familiar with the latest versions of ARMv8, should FP16 be considered here?
Thank you.
Would concocting the bytecode using such data type be a sensible test?
That's definitely a valid way to write the test if you can get it to crash like that. We should be accepting and legalizing all IR.
On another note, as I'm not very familiar with the latest versions of ARMv8, should FP16 be considered here?
Yes. f16, v4f16 and v8f16 are valid for both if Subtarget->hasFullFP16().
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
4579 ↗ | (On Diff #63685) | Why the extra brackets? |
Please, correct me if I'm wrong, but there's neither FRECPE nor FRSQRTE insts in ARMv8.1, are there?
Ah, OK. How about v1f32?
I wouldn't worry about that, I don't think it's used nearly as frequently. The v1f64 issue comes up because that's how arm_neon.h represents some vectors.
Please, correct me if I'm wrong, but there's neither FRECPE nor FRSQRTE insts in ARMv8.1, are there?
That's right. Full support for _Float16 is part of v8.2 I believe, but tracked as a separate feature in LLVM: "fullfp16" if you're doing -mattr.
I don't have the v8.2 documentation at hand, so, please indulge me, does it support both FRECPE and FRSQRTE for _Float16?
I don't have the v8.2 documentation at hand, so, please indulge me, does it support both FRECPE and FRSQRTE for _Float16?
It does:
$ echo "frecpe v0.4h, v1.4h" | llvm-mc -triple aarch64 -mattr=+fullfp16 -show-inst frecpe v0.4h, v1.4h // <MCInst #859 FRECPEv4f16 // <MCOperand Reg:40> // <MCOperand Reg:41>> $ echo "frsqrte v0.4h, v1.4h" | llvm-mc -triple aarch64 -mattr=+fullfp16 -show-inst frsqrte v0.4h, v1.4h // <MCInst #934 FRSQRTEv4f16 // <MCOperand Reg:40> // <MCOperand Reg:41>>
(plus similar results for scalar operations).
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
4579 ↗ | (On Diff #63685) | Oops! |