<div dir="auto">I looked around the codebase and didn't see anything that obviously looked like the natural place to turn constant zero immediates into zero-registers (i.e. registers that always return zero when read). Right now we are expanding them in ISelLowering::LowerOperation but that seems too early.<div dir="auto"><br></div><div dir="auto">The specific issue I'm hitting is that we have a register that reads as -1 and so when we replace -1 too early with this register, the standard "not" pattern (xor x, -1) will fail to match to "not".</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Sean Silva</div></div>