llvm-project
6b7f72c1 - [CIR] Add cir.ptr_mask (#224143)

Commit
2 days ago
[CIR] Add cir.ptr_mask (#224143) `cir.ptr_mask` ANDs a pointer with an integer mask and gives back a pointer, lowering to llvm.intr.ptrmask. Paired with `cir.ptr_stride` it rounds a pointer up to an alignment the way classic's emitRoundPointerUpToAlignment does, without the round trip through an integer that would lose provenance. llvm.ptrmask needs the mask at exactly the target's pointer index width, so the lowering extends or truncates it first. GEP takes an index of any width, so `cir.ptr_stride` never needed this. Assisted-by: Cursor / claude-opus-5
Author
Parents
Loading