Skip to content

add nuw i1 should simplify to or disjoint i1 (not to xor i1) #118164

@scottmcm

Description

@scottmcm

Today, add nuw i1 optimizes to xor i1: https://llvm.godbolt.org/z/n5fY4x8Gx

That loses information, though. It could instead optimize to or disjoint i1 (https://alive2.llvm.org/ce/z/PUwk-C), to preserve the fact that it can't be true + true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions