summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/patches
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-09-21 22:29:43 +0000
committerdim <dim@FreeBSD.org>2015-09-21 22:29:43 +0000
commit4512ff331cc292f4ec66a980cca5d03dd3c7473a (patch)
tree3be082b4fc9bba863f4749fbaf36305e1a18b468 /contrib/llvm/patches
parenta98b889039ac11e879f09473e61ccffa1adc71bc (diff)
downloadFreeBSD-src-4512ff331cc292f4ec66a980cca5d03dd3c7473a.zip
FreeBSD-src-4512ff331cc292f4ec66a980cca5d03dd3c7473a.tar.gz
Drop a patch which is already included in 3.7.0.
Diffstat (limited to 'contrib/llvm/patches')
-rw-r--r--contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff88
1 files changed, 0 insertions, 88 deletions
diff --git a/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff b/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff
deleted file mode 100644
index 1750e74..0000000
--- a/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff
+++ /dev/null
@@ -1,88 +0,0 @@
-Pull in r241142 from upstream llvm trunk (by David Majnemer):
-
- [SCCP] Turn loads of null into undef instead of zero initialized values
-
- Surprisingly, this is a correctness issue: the mmx type exists for
- calling convention purposes, LLVM doesn't have a zero representation for
- them.
-
- This partially fixes PR23999.
-
-Pull in r241143 from upstream llvm trunk (by David Majnemer):
-
- [LoopUnroll] Use undef for phis with no value live
-
- We would create a phi node with a zero initialized operand instead of
- undef in the case where no value was originally available. This was
- problematic for x86_mmx which has no null value.
-
-These fix a "Cannot create a null constant of that type!" error when
-compiling the graphics/sdl2_gfx port with MMX enabled.
-
-Introduced here: http://svnweb.freebsd.org/changeset/base/285149
-
-Index: lib/Transforms/Scalar/SCCP.cpp
-===================================================================
---- lib/Transforms/Scalar/SCCP.cpp
-+++ lib/Transforms/Scalar/SCCP.cpp
-@@ -1054,7 +1054,7 @@
-
- // load null -> null
- if (isa<ConstantPointerNull>(Ptr) && I.getPointerAddressSpace() == 0)
-- return markConstant(IV, &I, Constant::getNullValue(I.getType()));
-+ return markConstant(IV, &I, UndefValue::get(I.getType()));
-
- // Transform load (constant global) into the value loaded.
- if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Ptr)) {
-Index: lib/Transforms/Utils/LoopUnrollRuntime.cpp
-===================================================================
---- lib/Transforms/Utils/LoopUnrollRuntime.cpp
-+++ lib/Transforms/Utils/LoopUnrollRuntime.cpp
-@@ -81,7 +81,7 @@
- if (L->contains(PN)) {
- NewPN->addIncoming(PN->getIncomingValueForBlock(NewPH), OrigPH);
- } else {
-- NewPN->addIncoming(Constant::getNullValue(PN->getType()), OrigPH);
-+ NewPN->addIncoming(UndefValue::get(PN->getType()), OrigPH);
- }
-
- Value *V = PN->getIncomingValueForBlock(Latch);
-Index: test/Transforms/LoopUnroll/X86/mmx.ll
-===================================================================
---- test/Transforms/LoopUnroll/X86/mmx.ll
-+++ test/Transforms/LoopUnroll/X86/mmx.ll
-@@ -0,0 +1,21 @@
-+; RUN: opt < %s -S -loop-unroll | FileCheck %s
-+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-+target triple = "x86_64-unknown-linux-gnu"
-+
-+define x86_mmx @f() #0 {
-+entry:
-+ br label %for.body
-+
-+for.body: ; preds = %for.body, %entry
-+ %phi = phi i32 [ 1, %entry ], [ %add, %for.body ]
-+ %add = add i32 %phi, 1
-+ %cmp = icmp eq i32 %phi, 0
-+ br i1 %cmp, label %exit, label %for.body
-+
-+exit: ; preds = %for.body
-+ %ret = phi x86_mmx [ undef, %for.body ]
-+ ; CHECK: ret x86_mmx %ret
-+ ret x86_mmx %ret
-+}
-+
-+attributes #0 = { "target-cpu"="x86-64" }
-Index: test/Transforms/SCCP/crash.ll
-===================================================================
---- test/Transforms/SCCP/crash.ll
-+++ test/Transforms/SCCP/crash.ll
-@@ -27,3 +27,8 @@
- %B = extractvalue [4 x i32] %A, 1
- ret i32 %B
- }
-+
-+define x86_mmx @test3() {
-+ %load = load x86_mmx* null
-+ ret x86_mmx %load
-+}
OpenPOWER on IntegriCloud