load_combine_aa.ll 436 B

123456789101112131415
  1. ; RUN: opt -basicaa -instcombine -S < %s | FileCheck %s
  2. ; CHECK-LABEL: @test_load_combine_aa(
  3. ; CHECK: %[[V:.*]] = load i32, i32* %0
  4. ; CHECK: store i32 0, i32* %3
  5. ; CHECK: store i32 %[[V]], i32* %1
  6. ; CHECK: store i32 %[[V]], i32* %2
  7. define void @test_load_combine_aa(i32*, i32*, i32*, i32* noalias) {
  8. %a = load i32, i32* %0
  9. store i32 0, i32* %3
  10. %b = load i32, i32* %0
  11. store i32 %a, i32* %1
  12. store i32 %b, i32* %2
  13. ret void
  14. }