[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-04 Thread via cfe-commits
https://github.com/goldsteinn closed https://github.com/llvm/llvm-project/pull/71238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-04 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/71238 >From 7df7db58bd40e1da8805542abf0a9c6e6396d068 Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Fri, 3 Nov 2023 16:45:46 -0500 Subject: [PATCH] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-04 Thread Markus Böck via cfe-commits
@@ -19671,41 +19671,38 @@ RValue CodeGenFunction::EmitBuiltinIsAligned(const CallExpr *E) { /// TODO: actually use ptrmask once most optimization passes know about it. zero9178 wrote: Can this TODO be removed now?

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread via cfe-commits
goldsteinn wrote: > LGTM > > As a possible followup, we can probably drop the alignment assumption now? I > don't think it adds additional value if we're using ptrmask... Would think thats okay. Will post that after I push this. https://github.com/llvm/llvm-project/pull/71238

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM As a possible followup, we can probably drop the alignment assumption now? I don't think it adds additional value if we're using ptrmask... https://github.com/llvm/llvm-project/pull/71238 ___

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread via cfe-commits
goldsteinn wrote: If we get this in, any reason to add support for also directly canonicalizing the pattern (i.e: https://reviews.llvm.org/D154010) or is that gratuitous? https://github.com/llvm/llvm-project/pull/71238 ___ cfe-commits mailing list

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (goldsteinn) Changes Since PR's #69343 and #67166 we probably have enough support for `llvm.ptrmask` to make it preferable to the GEP stategy. --- Full diff: https://github.com/llvm/llvm-project/pull/71238.diff 3 Files Affected:

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread via cfe-commits
https://github.com/goldsteinn created https://github.com/llvm/llvm-project/pull/71238 Since PR's #69343 and #67166 we probably have enough support for `llvm.ptrmask` to make it preferable to the GEP stategy. >From fd00614be8cbe3dceaba654a687844f85f5436b4 Mon Sep 17 00:00:00 2001 From: Noah