From 8f020204f27aa10f778f9e549e01c6717d939d47 Mon Sep 17 00:00:00 2001 From: Carol Eidt Date: Thu, 26 Jul 2018 13:44:47 -0700 Subject: Include long shifts in OperIsShiftOrRotate The register allocator uses `OperIsShiftOrRotate` as the assertion for the method that gets the kills for the class of instructions that use RCX as the shift amount register. Expand it to include `RSH_LO` and `LSH_HI`. Fix #19081 --- src/jit/gentree.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/jit/gentree.h') diff --git a/src/jit/gentree.h b/src/jit/gentree.h index 83f07d3213..4195bf4650 100644 --- a/src/jit/gentree.h +++ b/src/jit/gentree.h @@ -1281,6 +1281,20 @@ public: return OperIsShift(OperGet()); } + static bool OperIsShiftLong(genTreeOps gtOper) + { +#ifdef _TARGET_64BIT_ + return false; +#else + return (gtOper == GT_LSH_HI) || (gtOper == GT_RSH_LO); +#endif + } + + bool OperIsShiftLong() const + { + return OperIsShiftLong(OperGet()); + } + static bool OperIsRotate(genTreeOps gtOper) { return (gtOper == GT_ROL) || (gtOper == GT_ROR); @@ -1293,7 +1307,7 @@ public: static bool OperIsShiftOrRotate(genTreeOps gtOper) { - return OperIsShift(gtOper) || OperIsRotate(gtOper); + return OperIsShift(gtOper) || OperIsRotate(gtOper) || OperIsShiftLong(gtOper); } bool OperIsShiftOrRotate() const -- cgit v1.2.3