Skip to content

[InstCombine][X86] simplifyX86FPMaxMin - allow NegZero for single operand #175552

@RKSimon

Description

@RKSimon

Follow up to #173270 and #175162

In cases where both operands are +/- 0.0f, SSE max/min instructions always return the second operand, meaning we can slightly relax the fpclass forbidden masks on a per-operand basis:

  • for converting to maxnum cases we only forbid -0.0f (fcNegZero) in the second operand
  • for converting to minnum cases we only forbid -0.0f (fcNegZero) in the first operand

CC @phoebewang in case I've missed something

Metadata

Metadata

Assignees

Labels

backend:X86good first issuehttps://github.com/llvm/llvm-project/contributellvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions