From 92afb40eea6e9a09af2d355ff9ab6a4bd04c54bb Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 11 Apr 2018 12:02:29 -0700 Subject: Some simple integer math opts (#1504) Stuff like x + 5 != 2 => x != -3. Also some cleanups of utility functions I noticed while writing this, isTypeFloat => isFloatType. Inspired by https://github.com/golang/go/blob/master/src/cmd/compile/internal/ssa/gen/generic.rules --- src/ir/load-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ir/load-utils.h') diff --git a/src/ir/load-utils.h b/src/ir/load-utils.h index 41b3c69ef..8df4bcde8 100644 --- a/src/ir/load-utils.h +++ b/src/ir/load-utils.h @@ -29,7 +29,7 @@ namespace LoadUtils { inline bool isSignRelevant(Load* load) { auto type = load->type; if (load->type == unreachable) return false; - return !isTypeFloat(type) && load->bytes < getTypeSize(type); + return !isFloatType(type) && load->bytes < getTypeSize(type); } // check if a load can be signed (which some opts want to do) -- cgit v1.2.3