diff options
author | Diana Picus <diana.picus@linaro.org> | 2017-07-11 09:43:51 +0000 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2017-07-11 09:43:51 +0000 |
commit | 443135c6eb36d14f19cab449f6f23613c9cd101b (patch) | |
tree | 8a31756b39b6f35815fa0c4b028c30f2a4f92dd0 /llvm/lib | |
parent | 9c171406c63c4b60cf0cbae9949ce0b712d057ec (diff) | |
download | bcm5719-llvm-443135c6eb36d14f19cab449f6f23613c9cd101b.tar.gz bcm5719-llvm-443135c6eb36d14f19cab449f6f23613c9cd101b.zip |
[ARM] GlobalISel: Fix oversight in G_FCMP legalization
We used to forget to erase the original instruction when replacing a
G_FCMP true/false. Fix this bug and make sure the tests check for it.
llvm-svn: 307639
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMLegalizerInfo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp index 6b082487ce2..f23e62595d2 100644 --- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp +++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp @@ -295,6 +295,7 @@ bool ARMLegalizerInfo::legalizeCustom(MachineInstr &MI, "Predicate needs libcalls, but none specified"); MIRBuilder.buildConstant(OriginalResult, Predicate == CmpInst::FCMP_TRUE ? 1 : 0); + MI.eraseFromParent(); return true; } |