]> git.proxmox.com Git - rustc.git/blobdiff - src/stdarch/crates/stdarch-test/src/lib.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / stdarch / crates / stdarch-test / src / lib.rs
index 4e25d2a02d9d37cf58d8bf33d74950472c8d6c75..fa73a7bba6b48ff9e73fd966234e21858e9b7d28 100644 (file)
@@ -88,6 +88,12 @@ pub fn assert(_fnptr: usize, fnname: &str, expected: &str) {
         instrs = &instrs[..instrs.len() - 1];
     }
 
+    // If the expected intrinsic is a nop it is compiled away so we
+    // can't check for it - aka the intrinsic is not generating any code
+    if expected == "nop" {
+        return;
+    }
+
     // Look for `expected` as the first part of any instruction in this
     // function, e.g., tzcntl in tzcntl %rax,%rax.
     let found = instrs.iter().any(|s| s.starts_with(expected));