Tyker | 6d36574 | 2020-08-28 21:46:16 +0200 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py |
| 2 | ; RUN: opt < %s -sroa -S | FileCheck %s |
| 3 | |
| 4 | source_filename = "tmp.cpp" |
| 5 | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" |
| 6 | target triple = "x86_64-unknown-linux-gnu" |
| 7 | |
| 8 | %struct.n.2 = type { i8 } |
| 9 | %struct.bi = type { %class.as } |
| 10 | %class.as = type { %class.ao } |
| 11 | %class.ao = type { %class.ai } |
| 12 | %class.ai = type { i32, i32 } |
| 13 | |
| 14 | define linkonce_odr dso_local void @_ZN2bg2baIiEC2ES_() unnamed_addr align 2 { |
| 15 | ; CHECK-LABEL: @_ZN2bg2baIiEC2ES_( |
| 16 | ; CHECK-NEXT: entry: |
| 17 | ; CHECK-NEXT: call void @llvm.assume(i1 true) [ "ignore"(%struct.bi* undef) ] |
| 18 | ; CHECK-NEXT: ret void |
| 19 | ; |
| 20 | entry: |
| 21 | %y = alloca i64, align 8 |
| 22 | store i64 undef, i64* %y, align 8 |
| 23 | %0 = bitcast i64* %y to %struct.n.2* |
| 24 | %1 = bitcast %struct.n.2* %0 to %struct.bi* |
| 25 | call void @llvm.assume(i1 true) [ "nonnull"(%struct.bi* %1) ] |
| 26 | ret void |
| 27 | } |
| 28 | |
| 29 | ; Function Attrs: nofree norecurse nounwind willreturn |
| 30 | declare void @llvm.assume(i1) #0 |
| 31 | |
| 32 | attributes #0 = { nofree norecurse nounwind willreturn } |