[PATCH] D83937: [Power] Set the mayRaiseFPException for FCMPUS/FCMPUD

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 03:22:36 PDT 2020


steven.zhang created this revision.
steven.zhang added reviewers: qiucf, jsji, ZhangKang, PowerPC.
Herald added subscribers: wuzish, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.

>From ISA, fcmpu will raise the Floating-Point Invalid Operation Exception (SNaN) if either of the operands is a Signaling NaN by setting the bit VXSNAN. But the instruction description didn't set the mayRaiseFPException which might have impact on the scheduling or some backend optimization.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83937

Files:
  llvm/lib/Target/PowerPC/PPCInstrInfo.td


Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -2570,7 +2570,7 @@
 let PPC970_Unit = 3, Predicates = [HasFPU] in {  // FPU Operations.
 //def FCMPO  : XForm_17<63, 32, (outs CRRC:$crD), (ins FPRC:$fA, FPRC:$fB),
 //                      "fcmpo $crD, $fA, $fB", IIC_FPCompare>;
-let isCompare = 1, hasSideEffects = 0 in {
+let isCompare = 1, mayRaiseFPException = 1, hasSideEffects = 0 in {
   def FCMPUS : XForm_17<63, 0, (outs crrc:$crD), (ins f4rc:$fA, f4rc:$fB),
                         "fcmpu $crD, $fA, $fB", IIC_FPCompare>;
   let Interpretation64Bit = 1, isCodeGenOnly = 1 in


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83937.278417.patch
Type: text/x-patch
Size: 743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200716/26ab2be8/attachment.bin>


More information about the llvm-commits mailing list