Introduce !align metadata for load instruction
[oota-llvm.git] / test / Analysis / ValueTracking / memory-dereferenceable.ll
index 550b01c4c9aa12e2f38690dcabe85c91f26cdfe0..c7ca21ab0614a04bfd80a3701cb571ba89f7b990 100644 (file)
@@ -122,6 +122,14 @@ entry:
     %load24 = load i32, i32* %deref_return, align 16
     %load25 = load i32, i32* %deref_and_aligned_return, align 16
 
+    ; Load from a dereferenceable and aligned load
+; CHECK: %d4_unaligned_load{{.*}}(unaligned)
+; CHECK: %d4_aligned_load{{.*}}(aligned)
+    %d4_unaligned_load = load i32*, i32** @globali32ptr, !dereferenceable !0
+    %d4_aligned_load = load i32*, i32** @globali32ptr, !dereferenceable !0, !align !{i64 16}
+    %load26 = load i32, i32* %d4_unaligned_load, align 16
+    %load27 = load i32, i32* %d4_aligned_load, align 16
+
     ret void
 }