[llvm] [SystemZ] Don't use FP Load and Test as comparisons to same reg (PR #78074)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 03:35:37 PST 2024


uweigand wrote:


> The one open end I am not sure about is the **NoFPExcept** flag? In the POP it says that an "exception is recognized". Since the LT may actually raise an exception, it should not have the NoFPExcept flag. On the other hand, that flag itself should not be there unless the input value is guaranteed to not be a NaN..?

That flag means that the user guarantees the exception flags will not be looked at (which is the default for LLVM floating-point operations unless some variation of strictfp is used).  The pseudo will have a correct setting of that flag based on the selection settings (strict FP or not), and this simply needs to be transferred to the actual MI instruction.
 
> (In emitLoadAndTestCmp0, I first cleared that flag, but then realized that adjustCCMasksForInstr() in SystemZElimCompare will then bail from the transformation because of this.)

No, you cannot always clear the flag, it needs to be copied over from the pseudo.


https://github.com/llvm/llvm-project/pull/78074


More information about the llvm-commits mailing list