If a non-pristine, callee-saved register is already present in LivePhysRegs, calling addPristines would cause it to be removed. Make sure that the existing contents of LivePhysRegs are preserved.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
When I wrote this I assumed that addLiveOuts()/addLiveIns() is only called on empty sets looks like I didn't add an assert() for that and ifconversion does indeed call it no non-empty sets now. Thanks for tracking this down!
- Can you maintain an optimized code path that avoids the creation of an extra LivePhysRegs instance in the common case where the set is empty?
- We probably want the same fix (or an assert(empty())) in LiveRegUnits as well.
Comment Actions
- Kept the original code for the case of empty set.
- Added the same fix to LiveRegUnits.
Good catch