Mercurial > hg > CbC > CbC_llvm
view clang/test/CodeGenOpenCL/ext-int-shift.cl @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | c4bab56944e8 |
children |
line wrap: on
line source
// RUN: %clang_cc1 -triple x86_64-linux-pc -O3 -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s void Shifts(_BitInt(12) E, int i) { E << 99; // CHECK: shl i12 %{{.+}}, 3 77 << E; // CHECK: %[[PROM:.+]] = zext i12 %{{.+}} to i32 // CHECK: %[[MASK:.+]] = and i32 %[[PROM]], 31 // CHECK: shl i32 77, %[[MASK]] E << i; // CHECK: %[[PROM:.+]] = trunc i32 %{{.+}} to i12 // CHECK: %[[MASK:.+]] = urem i12 %[[PROM]], 12 // CHECK: shl i12 %{{.+}}, %[[MASK]] i << E; // CHECK: %[[PROM:.+]] = zext i12 %{{.+}} to i32 // CHECK: %[[MASK:.+]] = and i32 %[[PROM]], 31 // CHECK: shl i32 %{{.+}}, %[[MASK]] }