llvm/llvm/test/Transforms/InferAlignment/undef-and-null.ll

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt -passes=infer-alignment -S < %s | FileCheck %s

define void @load_undef_null(ptr %P) {
; CHECK-LABEL: define void @load_undef_null
; CHECK-SAME: (ptr [[P:%.*]]) {
; CHECK-NEXT:    [[RET_0:%.*]] = load i32, ptr undef, align 4
; CHECK-NEXT:    [[RET_1:%.*]] = load i32, ptr null, align 4294967296
; CHECK-NEXT:    ret void
;
  %ret.0 = load i32, ptr undef
  %ret.1 = load i32, ptr null
  ret void
}

define void @store_undef_null(ptr %P) {
; CHECK-LABEL: define void @store_undef_null
; CHECK-SAME: (ptr [[P:%.*]]) {
; CHECK-NEXT:    store i32 123, ptr undef, align 4
; CHECK-NEXT:    store i32 124, ptr null, align 4294967296
; CHECK-NEXT:    ret void
;
  store i32 123, ptr undef
  store i32 124, ptr null
  ret void
}