[llvm] [Attributor] Pack out arguments into a struct (PR #119267)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 14:26:07 PST 2025
elhewaty wrote:
@jdoerfert
Here is the generated function, I think the code generates it perfectly for this case.
how to improve the callsite class?
```
define internal %foo_out @foo.converted(i32 %0, i32 %1) {
entry:
%dst_ = alloca i32, align 4
br label %entry1
entry1: ; preds = %entry
%x = xor i32 %0, 13
%y = add i32 %1, 5
%z = icmp sle i32 %x, %y
br i1 %z, label %if, label %else
if: ; preds = %entry1
store i32 %x, ptr %dst_, align 4
br label %end
else: ; preds = %entry1
store i32 %y, ptr %dst_, align 4
br label %end
end: ; preds = %else, %if
%t = mul i32 %x, %y
%tt = xor i32 %x, %y
%result = icmp eq i32 %t, %tt
%2 = load i32, ptr %dst_, align 4
%3 = insertvalue %foo_out undef, i1 %result, 0
%4 = insertvalue %foo_out %3, i32 %2, 1
ret %foo_out %4
}
```
thanks.
https://github.com/llvm/llvm-project/pull/119267
More information about the llvm-commits
mailing list