# stage2: fix "cmpxchg with ptr" test case · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d5c1d24964b0ee8ad37beb8e2a907e8caa645e07)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d5c1d24964b0ee8ad37beb8e2a907e8caa645e07

Requested commit: d5c1d24964b0ee8ad37beb8e2a907e8caa645e07

Commit: d5c1d24964b0ee8ad37beb8e2a907e8caa645e07

Tree: e7756f5ac6c7d3eb80fb9ab5845c123fbab425fa

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: fix "cmpxchg with ptr" test case

 * Sema: fix atomic operand checking to allow pointers.
 * LLVM backend: implement pointer-like optional constants.
 * LLVM backend: fix `is_non_null` and `optional_payload` instructions
   to support pointer-like optionals.
 * Type: introduce `isPtrAtRuntime` method.
 * Type: fix `isPtrLikeOptional` to get the correct answer for allowzero
   pointers and slices.

```

## Parents

- [b67d1810be3234c363ee2929ffcc91083bfb0ae5](https://git.cafe/gitcafe/zig/commit/b67d1810be3234c363ee2929ffcc91083bfb0ae5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d5c1d24964b0ee8ad37beb8e2a907e8caa645e07?format=markdown)
