================
@@ -199,6 +199,33 @@ llvm.func @compare_capture_float_failonly(%x : !llvm.ptr, 
%e : !llvm.ptr, %d : !
   llvm.return
 }
 
+// f80 postfix compare+capture: the value is padded to 16 bytes, so the old
+// value comes out of the i128 PHI through trunc and bitcast.
+// CHECK-LABEL: define void @compare_capture_f80_postfix(
+// CHECK:         load atomic i128, ptr %{{.*}} monotonic
+// CHECK:         fcmp oeq x86_fp80
+// CHECK:         cmpxchg ptr %{{.*}}, i128 %{{.*}}, i128 %{{.*}} monotonic 
monotonic
+// CHECK:       {{.*}}.atomic.exit:
+// CHECK:         %[[OK:.*]] = phi i1 [ false,
+// CHECK:         %[[OLD_BITS:.*]] = trunc i128 %{{.*}} to i80
+// CHECK:         %[[OLD_FP:.*]] = bitcast i80 %[[OLD_BITS]] to x86_fp80
+// CHECK:         %[[NEW:.*]] = select i1 %[[OK]], x86_fp80 %{{.*}}, x86_fp80 
%[[OLD_FP]]
----------------
MattPD wrote:

In `@compare_capture_f80_postfix`, the capture checks at lines 210 to 213 use 
`%{{.*}}` wildcards for three operands: the `i128` input to `trunc` (line 210), 
the true operand of `select` (line 212), and the destination pointer of `store` 
(line 213). These directives do not bind the consumed definitions: the 
exit-block `i128` PHI for `trunc`, the load from `%d` for the true `select` 
operand, and `%v` for the `store` pointer.

Could these checks bind those three definitions to FileCheck variables and 
reference them at their uses, as `@compare_capture_postfix` binds `%[[DVAL]]` 
and `%[[V]]` earlier in this file?

https://github.com/llvm/llvm-project/pull/226567
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to