Skip to content

SSA pass producing unnecessary phi nodes #28

Open
@rdaly525

Description

@rdaly525

The following example will produce a phi node for 'a' even thought it is unneeded. This causes problems when the types of 'a' in each branch are different

def foo(pred : Bit, x : BitVector[16]):
    if pred:
        a = Signed[16](x)
        b = a > 0
    else:
        a = Unsigned[16](x)
        b = a > 0
    #code that never uses 'a' again

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions