[gcc] Disable "bt" instruction even if optimization for size is used.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 152151e..be28712 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -14485,7 +14485,8 @@
 	    (const_int 1)
 	    (match_operand:DI 1 "nonmemory_operand" "rN"))
 	  (const_int 0)))]
-  "TARGET_64BIT && (TARGET_USE_BT || optimize_function_for_size_p (cfun))"
+  "TARGET_64BIT && (TARGET_USE_BT ||
+   optimize_function_for_size_p (cfun) && !flag_control_integrity)"
   "bt{q}\t{%1, %0|%0, %1}"
   [(set_attr "type" "alu1")])
 
@@ -14497,7 +14498,8 @@
 	    (const_int 1)
 	    (match_operand:SI 1 "nonmemory_operand" "rN"))
 	  (const_int 0)))]
-  "TARGET_USE_BT || optimize_function_for_size_p (cfun)"
+  "TARGET_USE_BT ||
+   optimize_function_for_size_p (cfun) && !flag_control_integrity"
   "bt{l}\t{%1, %0|%0, %1}"
   [(set_attr "type" "alu1")])
 
@@ -14773,7 +14775,8 @@
 		      (label_ref (match_operand 3 "" ""))
 		      (pc)))
    (clobber (reg:CC FLAGS_REG))]
-  "TARGET_64BIT && (TARGET_USE_BT || optimize_function_for_size_p (cfun))"
+  "TARGET_64BIT && (TARGET_USE_BT ||
+   optimize_function_for_size_p (cfun) && !flag_control_integrity)"
   "#"
   "&& 1"
   [(set (reg:CCC FLAGS_REG)
@@ -14806,7 +14809,8 @@
 		      (label_ref (match_operand 4 "" ""))
 		      (pc)))
    (clobber (reg:CC FLAGS_REG))]
-  "TARGET_64BIT && (TARGET_USE_BT || optimize_function_for_size_p (cfun))
+  "TARGET_64BIT && (TARGET_USE_BT ||
+   optimize_function_for_size_p (cfun) && !flag_control_integrity)
    && (INTVAL (operands[3]) & 0x3f) == 0x3f"
   "#"
   "&& 1"
@@ -14839,7 +14843,8 @@
 		      (label_ref (match_operand 3 "" ""))
 		      (pc)))
    (clobber (reg:CC FLAGS_REG))]
-  "TARGET_USE_BT || optimize_function_for_size_p (cfun)"
+  "TARGET_USE_BT ||
+   optimize_function_for_size_p (cfun) && !flag_control_integrity"
   "#"
   "&& 1"
   [(set (reg:CCC FLAGS_REG)
@@ -14872,7 +14877,8 @@
 		      (label_ref (match_operand 4 "" ""))
 		      (pc)))
    (clobber (reg:CC FLAGS_REG))]
-  "(TARGET_USE_BT || optimize_function_for_size_p (cfun))
+  "(TARGET_USE_BT ||
+    optimize_function_for_size_p (cfun) && !flag_control_integrity)
    && (INTVAL (operands[3]) & 0x1f) == 0x1f"
   "#"
   "&& 1"
@@ -14901,7 +14907,8 @@
 		      (label_ref (match_operand 3 "" ""))
 		      (pc)))
    (clobber (reg:CC FLAGS_REG))]
-  "TARGET_USE_BT || optimize_function_for_size_p (cfun)"
+  "TARGET_USE_BT ||
+   optimize_function_for_size_p (cfun) && !flag_control_integrity"
   "#"
   "&& 1"
   [(set (reg:CCC FLAGS_REG)
@@ -14938,7 +14945,8 @@
 	  (label_ref (match_operand 4 "" ""))
 	  (pc)))
    (clobber (reg:CC FLAGS_REG))]
-  "(TARGET_USE_BT || optimize_function_for_size_p (cfun))
+  "(TARGET_USE_BT ||
+    optimize_function_for_size_p (cfun) && !flag_control_integrity)
    && (INTVAL (operands[3]) & 0x1f) == 0x1f"
   "#"
   "&& 1"