Skip to content

SimplifyDemandedBits should handle fneg/fabs/fcopysign #97427

@arsenm

Description

@arsenm

fneg, fabs and fcopysign are defined as bit operations, and should be subject to bitwise simplification. Fneg is xor with a signbit mask, fabs is and with a sign mask, and fcopysign is and signbit mask, and inverted signbit mask, and or.

This would allow deleting more specific optimizations in visitFCOPYSIGN

This was brought up in #97180 (comment)_

Attaching starter patch to point where this needs to go:
0001-TODO-Support-FABS-FCOPYSIGN-FNEG-in-SimplifyDemanded.patch

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions