These become STRICT_FCMP and STRICT_FCMPE, when then get selected to the corresponding FCMP and FCMPE instructions, though the handling from there on isn't fully correct as we don't model reads and writes to FPCR and FPSR.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
We should be doing that (and for FCMP as well), but it's currently there as a FIXME in line 5259. I'd thought that it would be tricky to do (it certainly is in AArch32 in D73194, due to some strange interaction with fmstat causing psr liveness to go wrong) but actually experimenting a bit it doesn't seem that hard. I'll have a new patch shortly.
Probably need to make the FCMP and FCMPE ISD opcodes return true for isTargetStrictFPOpcode(). This done by making the opcodes larger than a specific constant. I’m on my phone so I don’t remember the exact name.
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
3562 | Do these need mayRaiseFPException? |
Hmm, I've made FCMP and FCMPE be used for both strict and non-strict SETCC but probably we only want isTargetStrictFPOpcode when it really is strict. I'll make a separate STRICT_FCMP and STRICT_FCMPE instead (and looking at the X86 and SystemZ targets that's how they've done it as well).
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
3562 | I'd rather not touch anything relating to modelling exception behaviour at the MachineInstr level at the moment, as I'm currently just working on getting SelectionDAG to stop hitting asserts. |
Do these need mayRaiseFPException?