[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 20 01:31:30 PDT 2025


================
@@ -0,0 +1,24 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=instcombine %s | FileCheck %s
+
+; Check that `select B, true, C` isn't optimized to `or B, C`.
----------------
nikic wrote:

```suggestion
; Check that `select B, true, C` isn't optimized to `or B, C`,
; because the invalid addrspacecast %asc.shared may introduce poison.
```

https://github.com/llvm/llvm-project/pull/144686


More information about the llvm-commits mailing list