[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Thu May 29 12:04:54 PDT 2025


================
@@ -0,0 +1,90 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -S -passes=instcombine < %s | FileCheck %s
+
+; sinf clobbering errno, but %p cannot alias errno per C/C++ strict aliasing rules via TBAA.
+; Hence, can do constant store-to-load forwarding.
+define float @does_not_alias_errno(ptr noundef %p, float noundef %f) {
----------------
nikic wrote:

Shouldn't need the noundef attributes.

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


More information about the cfe-commits mailing list