This patch tries to incorporate the new replaceAllDbgUsersWith
function while folding a cast into a phi instruction.
Details
- Reviewers
vsk
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 20616 Build 20616: arc lint + arc unit
Event Timeline
Thanks, a few comments inline --
test/Transforms/InstCombine/phi_cast.ll | ||
---|---|---|
8 | Why not define in 'i1 %cond' etc. as function parameters? Then the icmp and sdiv become unnecessary. | |
20 | Hold on, if this is a phi i1, then doesn't that mean that 'foldOpIntoPhi' didn't trigger? | |
25 | Doesn't "i" mean "An integer constant (of target-specific width)"? I'm not sure whether the instruction is well-formed without a constraint, but if it isn't, then the "r" (register) constraint seems like the appropriate one here. |
- Update test according to comments.
The result of instcombine doesn't seem to be affected by the asm sideeffect or
by the replaceAllDbgUsersWith though.
Why is the side-effecting use necessary? Have you tried using any other constructions to get to a minimal test?
Why not define in 'i1 %cond' etc. as function parameters? Then the icmp and sdiv become unnecessary.