forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid setting tbaa on the store of return type of call to inline asse…
…mbler. In 32bit mode, attaching TBAA metadata to the store following the call to inline assembler results in describing the wrong type by making a fake lvalue(i.e., whatever the inline assembler happens to leave in EAX:EDX.) Even if inline assembler somehow describes the correct type, setting TBAA information on return type of call to inline assembler is likely not correct, since TBAA rules need not apply to inline assembler. Differential Revision: https://reviews.llvm.org/D115320
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// RUN: %clang_cc1 -triple i386-unknown-linux-gnu -O2 -disable-llvm-passes -fasm-blocks %s -emit-llvm -o - | FileCheck --check-prefix=STORE-LINE %s | ||
double foo(double z) { | ||
// STORE-LINE-LABEL: define{{.*}} double @_Z3food | ||
unsigned short ControlWord; | ||
__asm { fnstcw word ptr[ControlWord]} | ||
; | ||
// STORE-LINE: store i64 %{{.*}}, i64* %{{.*}}, | ||
// STORE-LINE-NOT: align 4, !tbaa | ||
// STORE-LINE-SAME: align 4 | ||
return z; | ||
} |