We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
byval
For the following code, clangir seems to generate code that departures from existing CodeGen:
clangir
struct T { struct { long a[16]; long b; }; int c; }; void opaque(T*); void foo(T t) { opaque(&t); }
Expected:
%struct.T = type { %struct.anon, i32 } %struct.anon = type { [20 x i64], i64 } define dso_local void @foo(T)(ptr noundef byval(%struct.T) align 8 %t) { entry: call void @opaque(T*)(ptr noundef %t) ret void } declare void @opaque(T*)(ptr noundef) #1
Actual
%struct.T = type { %struct.anon.1, i32 } %struct.anon.1 = type { [20 x i64], i64 } declare void @_Z6opaqueP1T(ptr) define void @_Z3foo1T(%struct.T %0) { %2 = alloca %struct.T, i64 1, align 8 store %struct.T %0, ptr %2, align 8 call void @_Z6opaqueP1T(ptr %2) ret void }
The text was updated successfully, but these errors were encountered:
We need to honour byval!
Sorry, something went wrong.
@sitio-couto recent work on target lowering is the right place to implement this
No branches or pull requests
For the following code,
clangir
seems to generate code that departures from existing CodeGen:Expected:
Actual
The text was updated successfully, but these errors were encountered: