about summary refs log tree commit diff
path: root/tests/codegen/ascii-char.rs
diff options
context:
space:
mode:
authorMatthew Maurer <mmaurer@google.com>2024-04-11 17:16:27 +0000
committerMatthew Maurer <mmaurer@google.com>2024-04-11 17:20:08 +0000
commite70cf014b8618e332ada1e24c343549b88cd28ce (patch)
tree78c2d526e03ae61c263cd784351f324a5f5d24f3 /tests/codegen/ascii-char.rs
parent72fe8a0f0049873f4b1d0ab3c482170921819106 (diff)
downloadrust-e70cf014b8618e332ada1e24c343549b88cd28ce.tar.gz
rust-e70cf014b8618e332ada1e24c343549b88cd28ce.zip
codegen tests: Tolerate `nuw` `nsw` on `trunc`
llvm/llvm-project#87910 infers `nuw` and `nsw` on some `trunc`
instructions we're doing `FileCheck` on. Tolerate but don't require them
to support both release and head LLVM.
Diffstat (limited to 'tests/codegen/ascii-char.rs')
-rw-r--r--tests/codegen/ascii-char.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen/ascii-char.rs b/tests/codegen/ascii-char.rs
index fab9f8632fc..86ec9d73afe 100644
--- a/tests/codegen/ascii-char.rs
+++ b/tests/codegen/ascii-char.rs
@@ -12,7 +12,7 @@ pub fn unwrap_digit_from_remainder(v: u32) -> AsciiChar {
     // CHECK-NOT: panic
 
     // CHECK: %[[R:.+]] = urem i32 %v, 10
-    // CHECK-NEXT: %[[T:.+]] = trunc i32 %[[R]] to i8
+    // CHECK-NEXT: %[[T:.+]] = trunc{{( nuw)?( nsw)?}} i32 %[[R]] to i8
     // CHECK-NEXT: %[[D:.+]] = or{{( disjoint)?}} i8 %[[T]], 48
     // CHECK-NEXT: ret i8 %[[D]]