This revision was automatically updated to reflect the committed changes.
Closed by commit rC323156: Reland [CodeGen] Fix crash when a function
taking transparent union is… (authored by vsapsai, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D41311?vs=130038=130964#toc
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
LGTM.
https://reviews.llvm.org/D41311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
vsapsai updated this revision to Diff 130038.
vsapsai added a comment.
- Try another approach for the fix. It has broader impact but semantically
seems to be more correct.
Also I think `hasScalarEvaluationKind` should use `Arg->getType()` everywhere
as it matches `EmitParmDecl` behaviour.
vsapsai added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:2321
+ ArgI.getCoerceToType() ==
+ ConvertType(isPromoted ? Ty : Arg->getType()) &&
ArgI.getDirectOffset() == 0) {
ahatanak wrote:
> Maybe a comment
ahatanak added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:2321
+ ArgI.getCoerceToType() ==
+ ConvertType(isPromoted ? Ty : Arg->getType()) &&
ArgI.getDirectOffset() == 0) {
Maybe a comment explaining why different
ahatanak added a comment.
It doesn't look like this patch would break IRGen for functions that receive
fp16 types. fp16 is passed as i32 or float (without promotion) on ARM and as
half on ARM64. It should work fine.
https://reviews.llvm.org/D41311
vsapsai added a subscriber: ahatanak.
vsapsai added a comment.
Add Akira as __fp16 expert to make sure I don't break some edge cases.
https://reviews.llvm.org/D41311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
vsapsai updated this revision to Diff 128643.
vsapsai added a comment.
- Fix using CreateCoercedStore for promoted float parameters.
For promoted parameters double -> float conversion should use fptrunc, not
casting through memory preserving bits. Tried to change CreateCoercedStore to
do
vsapsai reopened this revision.
vsapsai added a comment.
This revision is now accepted and ready to land.
The fix wasn't entirely correct and was reverted in r321306 as it caused test
failures
FAIL: imp.execution_time
FAIL: 2007-01-04-KNR-Args.execution_time
FAIL: sse_expandfft.execution_time
This revision was automatically updated to reflect the committed changes.
Closed by commit rC321296: [CodeGen] Fix crash when a function taking
transparent union is redeclared. (authored by vsapsai, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D41311?vs=127779=127923#toc
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Okay, I think that's reasonable enough. LGTM.
https://reviews.llvm.org/D41311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
vsapsai updated this revision to Diff 127779.
vsapsai added a comment.
- Address review comment, compare ArgI type with Arg type. Update tests to
account for coerced store when types don't match.
https://reviews.llvm.org/D41311
Files:
clang/lib/CodeGen/CGCall.cpp
vsapsai added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:2321
+ !isa(ConvertType(Arg->getType())) &&
ArgI.getCoerceToType() == ConvertType(Ty) &&
ArgI.getDirectOffset() == 0) {
vsapsai wrote:
> rjmccall wrote:
> > I
vsapsai added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:2321
+ !isa(ConvertType(Arg->getType())) &&
ArgI.getCoerceToType() == ConvertType(Ty) &&
ArgI.getDirectOffset() == 0) {
rjmccall wrote:
> I think the right fix
rjmccall added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:2321
+ !isa(ConvertType(Arg->getType())) &&
ArgI.getCoerceToType() == ConvertType(Ty) &&
ArgI.getDirectOffset() == 0) {
I think the right fix is to change the
vsapsai created this revision.
vsapsai added reviewers: rjmccall, rafael.
Herald added subscribers: kristof.beyls, aemerson.
When a function taking transparent union is declared as taking one of
union members earlier in the translation unit, clang would hit an
"Invalid cast" assertion during
16 matches
Mail list logo