Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (279440 => 279441)
--- trunk/Source/_javascript_Core/ChangeLog 2021-06-30 23:15:09 UTC (rev 279440)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-06-30 23:36:34 UTC (rev 279441)
@@ -1,3 +1,19 @@
+2021-06-30 Mark Lam <[email protected]>
+
+ ARM64: Disable selection of BFI instruction variants by default.
+ https://bugs.webkit.org/show_bug.cgi?id=227554
+ rdar://79978150
+
+ Reviewed by Saam Barati.
+
+ We suspect that this may have caused some hangs. Disabling while we investigate.
+
+ * b3/B3LowerToAir.cpp:
+ * b3/testb3_2.cpp:
+ (testInsertBitField32):
+ (testInsertBitField64):
+ * runtime/OptionsList.h:
+
2021-06-29 Joonghun Park <[email protected]>
Remove "function declared ‘static’ but never defined" build warnings since r278971.
Modified: trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp (279440 => 279441)
--- trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp 2021-06-30 23:15:09 UTC (rev 279440)
+++ trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp 2021-06-30 23:36:34 UTC (rev 279441)
@@ -2764,6 +2764,8 @@
// UBFX Pattern: dest = (src >> lsb) & mask
// Where: mask = (1 << width) - 1
auto tryAppendUBFX = [&] () -> bool {
+ if (!Options::useBFI())
+ return false;
Air::Opcode opcode = opcodeForType(ExtractUnsignedBitfield32, ExtractUnsignedBitfield64, m_value->type());
if (!isValidForm(opcode, Arg::Tmp, Arg::Imm, Arg::Imm, Arg::Tmp))
return false;
@@ -2826,6 +2828,8 @@
// Where: mask1 = ((1 << width) - 1)
// mask2 = ~(mask1 << lsb)
auto tryAppendBFI = [&] (Value* left, Value* right) -> bool {
+ if (!Options::useBFI())
+ return false;
Air::Opcode opcode = opcodeForType(InsertBitField32, InsertBitField64, m_value->type());
if (!isValidForm(opcode, Arg::Tmp, Arg::Imm, Arg::Imm, Arg::Tmp))
return false;
@@ -3030,6 +3034,8 @@
// SBFIZ Pattern: d = ((src << amount) >> amount) << lsb
// where: amount = datasize - width
auto tryAppendSBFIZ = [&] () -> bool {
+ if (!Options::useBFI())
+ return false;
Air::Opcode opcode = opcodeForType(InsertSignedBitfieldInZero32, InsertSignedBitfieldInZero64, m_value->type());
if (!isValidForm(opcode, Arg::Tmp, Arg::Imm, Arg::Imm, Arg::Tmp))
return false;
Modified: trunk/Source/_javascript_Core/b3/testb3_2.cpp (279440 => 279441)
--- trunk/Source/_javascript_Core/b3/testb3_2.cpp 2021-06-30 23:15:09 UTC (rev 279440)
+++ trunk/Source/_javascript_Core/b3/testb3_2.cpp 2021-06-30 23:36:34 UTC (rev 279441)
@@ -3160,6 +3160,8 @@
void testInsertBitField32()
{
+ if (!JSC::Options::useBFI())
+ return;
if (JSC::Options::defaultB3OptLevel() < 2)
return;
uint32_t d = 0xf0f0f0f0;
@@ -3238,6 +3240,8 @@
void testInsertBitField64()
{
+ if (!JSC::Options::useBFI())
+ return;
if (JSC::Options::defaultB3OptLevel() < 2)
return;
uint64_t d = 0xf0f0f0f0f0f0f0f0;
Modified: trunk/Source/_javascript_Core/runtime/OptionsList.h (279440 => 279441)
--- trunk/Source/_javascript_Core/runtime/OptionsList.h 2021-06-30 23:15:09 UTC (rev 279440)
+++ trunk/Source/_javascript_Core/runtime/OptionsList.h 2021-06-30 23:36:34 UTC (rev 279441)
@@ -548,6 +548,7 @@
v(Bool, verboseExecutablePoolAllocation, false, Normal, nullptr) \
v(Bool, useDataIC, isARM64(), Normal, nullptr) \
v(Bool, useDataICInOptimizingJIT, false, Normal, nullptr) \
+ v(Bool, useBFI, false, Normal, "Allow ARM64 instruction selection of BFI") \
enum OptionEquivalence {