[all-commits] [llvm/llvm-project] 37dd96: [Attributor] Compare an indirect call's callee in ...
Larry Meadows via All-commits
all-commits at lists.llvm.org
Tue Sep 8 12:17:25 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 37dd96fedb5973485b37d03ec7a1fdbf6d1e6dbc
https://github.com/llvm/llvm-project/commit/37dd96fedb5973485b37d03ec7a1fdbf6d1e6dbc
Author: Larry Meadows <Lawrence.Meadows at amd.com>
Date: 2026-09-08 (Tue, 08 Sep 2026)
Changed paths:
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
A llvm/test/Transforms/Attributor/indirect_call_program_address_space.ll
Log Message:
-----------
[Attributor] Compare an indirect call's callee in the program address space (#222097)
Specializing an indirect call emits, for each candidate callee, an
`icmp` between
the call's callee operand and the candidate. The operand was first
normalized to
address space 0, but the candidates are functions, and functions live in
the
target's program address space. Where that is not 0 the two sides of the
comparison had different types and the `icmp` asserted:
```
Instructions.h:1266: void llvm::ICmpInst::AssertOK(): Assertion
`getOperand(0)->getType() == getOperand(1)->getType() &&
"Both operands to ICmp instruction are not of the same type!"' failed.
```
Normalize to the program address space instead. It is 0 unless a target
says
otherwise, so nothing changes for those; for `spirv64`, whose data
layout sets
`P9`, it is the difference between comparing a `ptr` with a `ptr
addrspace(9)`
and comparing two `ptr addrspace(9)`.
This was found on the `intel-sycl-gpu` builder, which crashed compiling
`offload/test/offloading/nested_parallel_reduction.c` for
`spirv64-intel` once
841d4ad6b315 let that call site reach the specialization path: before,
it took
the single-callee promotion path, which emits no comparison. The bug it
reached
is older than that commit and is not specific to OpenMP, so the test
added here
is a plain Attributor one that needs only a data layout with a non-zero
program
address space.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list