aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ScalarRepl/union-fp-int.ll
blob: c8eaeeab24b86b685c02eae530f780e122564f8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
; RUN:   not grep alloca
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
; RUN:   grep {bitcast.*float.*i32}

implementation

int %test(float %X) {
        %X_addr = alloca float
        store float %X, float* %X_addr
        %X_addr = bitcast float* %X_addr to int*
        %tmp = load int* %X_addr
        ret int %tmp
}