Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
What's the justification for 0 rather than undef? That the high bits need to be guaranteed equal even for undef input?
Comment Actions
For zext the high bits need to be 0 and for sext the high bits need to match. The result of the fold needs to produce a value that is possible given the undefined input we received. If we folded to undef that would be a larger set of values than were possible. We're allowed to assume a specific value for the input. So here we've assume the input is 0.