Skip to content

[VectorCombine] Don't use Builder.Create* methods when replacing flags #149853

@RKSimon

Description

@RKSimon

As detailed here: #148350 (comment)

Since we use IRBuilder in VectorCombine, the result may point to an existing cast instruction instead of CastOp (NewOp). Therefore, it may propagate flags into an incorrect instruction. I recommend using CastInst::Create instead of Builder.CreateCast.

Technically we only need to update the instructions where we're replacing the flags, but probably we want to be consistent at least per-fold if not everywhere.

CC @rhyadav @dtcxzyw

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions