summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-05-05 18:49:05 +0000
committerPete Cooper <peter_cooper@apple.com>2015-05-05 18:49:05 +0000
commit05b84d416881e64642884f7620962b440a10921c (patch)
tree8092756d264d18d8a67e4e871cb71cb62a4eb88c
parentce36c4cee190067fa3e9b4d3f19eda6c986cefc4 (diff)
downloadbcm5719-llvm-05b84d416881e64642884f7620962b440a10921c.tar.gz
bcm5719-llvm-05b84d416881e64642884f7620962b440a10921c.zip
Revert "Fix IfConverter to handle regmask machine operands."
This reverts commit b27413cbfd78d959c18e713bfa271fb69e6b3303 (ie r236515). This is to get the bots green while i investigate the failures. llvm-svn: 236517
-rw-r--r--llvm/lib/CodeGen/IfConversion.cpp14
-rw-r--r--llvm/test/CodeGen/ARM/ifcvt-regmask-noreturn.ll45
2 files changed, 0 insertions, 59 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp
index 4bad70925d7..938c9cf6039 100644
--- a/llvm/lib/CodeGen/IfConversion.cpp
+++ b/llvm/lib/CodeGen/IfConversion.cpp
@@ -985,20 +985,6 @@ static void UpdatePredRedefs(MachineInstr *MI, LivePhysRegs &Redefs) {
// take a mutable instruction instead of const.
MachineInstr *OpMI = const_cast<MachineInstr*>(Op.getParent());
MachineInstrBuilder MIB(*OpMI->getParent()->getParent(), OpMI);
-
- if (Op.isRegMask()) {
- // First handle regmasks. They clobber any entries in the mask which
- // means that we need a def for those registers.
- MIB.addReg(Reg.first, RegState::Implicit | RegState::Undef);
-
- // We also need to add an implicit def of this register for the later
- // use to read from.
- // For the register allocator to have allocated a register clobbered
- // by the call which is used later, it must be the case that
- // the call doesn't return.
- MIB.addReg(Reg.first, RegState::Implicit | RegState::Define);
- continue;
- }
assert(Op.isReg() && "Register operand required");
MIB.addReg(Reg.first, RegState::Implicit | RegState::Undef);
}
diff --git a/llvm/test/CodeGen/ARM/ifcvt-regmask-noreturn.ll b/llvm/test/CodeGen/ARM/ifcvt-regmask-noreturn.ll
deleted file mode 100644
index cf04fc90504..00000000000
--- a/llvm/test/CodeGen/ARM/ifcvt-regmask-noreturn.ll
+++ /dev/null
@@ -1,45 +0,0 @@
-; RUN: llc %s -o - -verify-machineinstrs | FileCheck %s
-
-target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
-target triple = "thumbv7s-apple-ios8.0.0"
-
-@debw = external global i8*, align 4
-
-; This test ensures that the stack_chk call correctly puts implicit uses/defs for the regsiters
-; live across it when if converting. This will be R0 which is passed to the call to free at the end
-; of the function.
-; Prior to this change, the stack_chk call (which does not return) would clobber R0 in its regmask,
-; leading to verifier errors because the later use of R0 in free() is not live.
-
-; CHECK-LABEL: @test
-; CHECK: stack_chk_fail
-
-; Function Attrs: ssp
-define void @test(i32 %argc, i8** nocapture readonly %argv, i32* %ptr, i32 %val) #0 {
-entry:
- %count.i = alloca [256 x i32], align 4
- %cmp284.i = icmp eq i32 %val, 0
- br i1 %cmp284.i, label %for.end31.i, label %for.body21.i
-
-for.body21.i: ; preds = %entry
- %arrayidx23.i = getelementptr inbounds [256 x i32], [256 x i32]* %count.i, i32 0, i32 1
- %tmp20 = load i32, i32* %arrayidx23.i, align 4, !tbaa !0
- store i32 %tmp20, i32* %ptr, align 4, !tbaa !0
- br label %for.end31.i
-
-for.end31.i: ; preds = %for.body21.i, %entry
- %tmp21 = load i8*, i8** @debw, align 4, !tbaa !4
- tail call void @free(i8* %tmp21)
- ret void
-}
-
-declare void @free(i8* nocapture)
-
-attributes #0 = { ssp "stack-protector-buffer-size"="8" }
-
-!0 = !{!1, !1, i64 0}
-!1 = !{!"int", !2, i64 0}
-!2 = !{!"omnipotent char", !3, i64 0}
-!3 = !{!"Simple C/C++ TBAA"}
-!4 = !{!5, !5, i64 0}
-!5 = !{!"any pointer", !2, i64 0}
OpenPOWER on IntegriCloud