xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/uint128_t.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin9
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc typedef unsigned long long uint64_t;
4*f4a2713aSLionel Sambuc extern uint64_t numer;
5*f4a2713aSLionel Sambuc extern uint64_t denom;
6*f4a2713aSLionel Sambuc 
7*f4a2713aSLionel Sambuc uint64_t
f(uint64_t val)8*f4a2713aSLionel Sambuc f(uint64_t val)
9*f4a2713aSLionel Sambuc {
10*f4a2713aSLionel Sambuc     __uint128_t tmp;
11*f4a2713aSLionel Sambuc 
12*f4a2713aSLionel Sambuc     tmp = val;
13*f4a2713aSLionel Sambuc     tmp *= numer;
14*f4a2713aSLionel Sambuc     tmp /= denom;
15*f4a2713aSLionel Sambuc 
16*f4a2713aSLionel Sambuc     return tmp;
17*f4a2713aSLionel Sambuc }
18*f4a2713aSLionel Sambuc 
19