summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp17
-rw-r--r--llvm/test/CodeGen/X86/half.ll3
2 files changed, 2 insertions, 18 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index c887be42ec6..4c9aac5953a 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -29639,23 +29639,6 @@ bool X86TargetLowering::IsDesirableToPromoteOp(SDValue Op, EVT &PVT) const {
bool Commute = false;
switch (Op.getOpcode()) {
default: break;
- case ISD::LOAD: {
- LoadSDNode *LD = cast<LoadSDNode>(Op);
- // If the non-extending load has a single use and it's not live out, then it
- // might be folded.
- if (LD->getExtensionType() == ISD::NON_EXTLOAD /*&&
- Op.hasOneUse()*/) {
- for (SDNode::use_iterator UI = Op.getNode()->use_begin(),
- UE = Op.getNode()->use_end(); UI != UE; ++UI) {
- // The only case where we'd want to promote LOAD (rather then it being
- // promoted as an operand is when it's only use is liveout.
- if (UI->getOpcode() != ISD::CopyToReg)
- return false;
- }
- }
- Promote = true;
- break;
- }
case ISD::SIGN_EXTEND:
case ISD::ZERO_EXTEND:
case ISD::ANY_EXTEND:
diff --git a/llvm/test/CodeGen/X86/half.ll b/llvm/test/CodeGen/X86/half.ll
index 4c164b58bfe..9a9fb582055 100644
--- a/llvm/test/CodeGen/X86/half.ll
+++ b/llvm/test/CodeGen/X86/half.ll
@@ -19,7 +19,8 @@ define void @test_load_store(half* %in, half* %out) {
define i16 @test_bitcast_from_half(half* %addr) {
; CHECK-LABEL: test_bitcast_from_half:
-; CHECK: movzwl (%rdi), %eax
+; BWON: movzwl (%rdi), %eax
+; BWOFF: movw (%rdi), %ax
%val = load half, half* %addr
%val_int = bitcast half %val to i16
ret i16 %val_int
OpenPOWER on IntegriCloud