We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2c717f commit 0b96feeCopy full SHA for 0b96fee
tests/codegen/issues/issue-106369.rs
@@ -0,0 +1,15 @@
1
+// compile-flags: -O
2
+// ignore-debug (the extra assertions get in the way)
3
+
4
+#![crate_type = "lib"]
5
6
+// From <https://github.com/rust-lang/rust/issues/106369#issuecomment-1369095304>
7
8
+// CHECK-LABEL: @issue_106369(
9
+#[no_mangle]
10
+pub unsafe fn issue_106369(ptr: *const &i32) -> bool {
11
+ // CHECK-NOT: icmp
12
+ // CHECK: ret i1 true
13
14
+ Some(std::ptr::read(ptr)).is_some()
15
+}
0 commit comments