Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1729)

Unified Diff: test/CodeGen/X86/invalid-gcc-snan-conversion.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/CodeGen/X86/frameaddr.ll ('k') | test/CodeGen/X86/lea-2.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/CodeGen/X86/invalid-gcc-snan-conversion.ll
diff --git a/test/CodeGen/X86/invalid-gcc-snan-conversion.ll b/test/CodeGen/X86/invalid-gcc-snan-conversion.ll
new file mode 100644
index 0000000000000000000000000000000000000000..416f0c0b83a1b67969e586cf273a51931a7eed70
--- /dev/null
+++ b/test/CodeGen/X86/invalid-gcc-snan-conversion.ll
@@ -0,0 +1,25 @@
+; If LLVM is built in Release mode with a buggy gcc under x86-32, it
+; may transform 64-bit constants with a signaling NaN bit pattern into
+; a quiet NaN bit pattern. See
+; http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416
+
+; RUN: llc -march=x86-64 < %s | FileCheck %s
+
+define i32 @main() #0 {
+entry:
+ %retval = alloca i32, align 4
+ %tmp = alloca i64, align 8
+ store i32 0, i32* %retval
+; -4503599627370495 == 0xfff0000000000001
+ store i64 -4503599627370495, i64* %tmp, align 8
+ %0 = load i64* %tmp, align 8
+ call void @Consume(i64 %0)
+ ret i32 0
+}
+
+; CHECK: main:
+; make sure 0xfff0000000000001 didn't change to 0xfff8000000000001
+; CHECK: 0xFFF00000
+; CHECK-NOT: 0xFFF80000
+
+declare void @Consume(i64) #1
« no previous file with comments | « test/CodeGen/X86/frameaddr.ll ('k') | test/CodeGen/X86/lea-2.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698