The constrained fp operation fcmp was added by https://reviews.llvm.org/D69281. This patch is trying to add the support for PowerPC backend. For now, only scalar type is supported.
Details
- Reviewers
uweigand qiucf kbarton jsji - Group Reviewers
Restricted Project - Commits
- rG55de46f3b2c5: [PowerPC] Support constrained fp operation for setcc
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
428 | Shouldn't all f128 support be guarded by EnableQuadPrecision? | |
llvm/lib/Target/PowerPC/PPCInstrInfo.td | ||
3964 | This looks incorrect; you cannot use the same FCMPUS operation for both signaling and quiet compares. If I read the PowerISA correctly, the "fcmpo" instruction (not "fcmpu") is the correct one to use to implement signaling compares. |
The one issue I still see is that when falling back to library calls on older platforms, signaling and non-signaling compares both are treated the same. But that's really a pre-existing problem because this is not fully supported by libgcc (see the comment in TargetLowering::softenSetCCOperands), so it's not really a problem with this patch.
The patch itself LGTM.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
428 | Ah, I missed that. OK, that's fine then. |
Shouldn't all f128 support be guarded by EnableQuadPrecision?