summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-11-15 15:30:48 -0800
committerThomas Lively <tlively@google.com>2019-11-15 16:22:01 -0800
commit194d7ec081c31ee4ed82bfa3cade4ef30afab912 (patch)
tree1cbd56e32bd7b8413e89d37f6031a2c6af2de7e6 /llvm/lib
parentce0f3ee5e4dc2eed5390b57d4a1e37c8bf17a995 (diff)
downloadbcm5719-llvm-194d7ec081c31ee4ed82bfa3cade4ef30afab912.tar.gz
bcm5719-llvm-194d7ec081c31ee4ed82bfa3cade4ef30afab912.zip
[WebAssembly] Fix miscompile of select with and
Summary: Rolls back the remaining bad optimizations introduced in eb15d00193f. Some of them were already rolled back in e661f946a7db and this finishes the job. Fixes https://bugs.llvm.org/show_bug.cgi?id=44012. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70347
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td
index 5c9b34f4473..104f5f7d2e6 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td
@@ -121,10 +121,3 @@ def : Pat<(select (i32 (seteq I32:$cond, 0)), F32:$lhs, F32:$rhs),
(SELECT_F32 F32:$rhs, F32:$lhs, I32:$cond)>;
def : Pat<(select (i32 (seteq I32:$cond, 0)), F64:$lhs, F64:$rhs),
(SELECT_F64 F64:$rhs, F64:$lhs, I32:$cond)>;
-
-// The legalizer inserts an unnecessary `and 1` to make input conform
-// to getBooleanContents, which we can lower away.
-def : Pat<(select (i32 (and I32:$cond, 1)), F32:$lhs, F32:$rhs),
- (SELECT_F32 F32:$lhs, F32:$rhs, I32:$cond)>;
-def : Pat<(select (i32 (and I32:$cond, 1)), F64:$lhs, F64:$rhs),
- (SELECT_F64 F64:$lhs, F64:$rhs, I32:$cond)>;
OpenPOWER on IntegriCloud