Files
clang-p2996/clang/test/CodeGenCXX/pr27030.cpp
Roman Lebedev b291597112 Revert rest of IRBuilderBase's short-circuiting folds
Upon further investigation and discussion,
this is actually the opposite direction from what we should be taking,
and this direction wouldn't solve the motivational problem anyway.

Additionally, some more (polly) tests have escaped being updated.
So, let's just take a step back here.

This reverts commit f3190dedee.
This reverts commit 749581d21f.
This reverts commit f3df87d57e.
This reverts commit ab1dbcecd6.
2021-10-28 02:15:14 +03:00

17 lines
553 B
C++

// RUN: %clang_cc1 -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s
struct A {};
struct B : A {};
extern "C" {
extern int B::*a;
void test1() { (int A::*)(a); }
}
// CHECK-LABEL: define dso_local void @test1(
// CHECK: %[[load:.*]] = load i32, i32* @a
// CHECK: %[[memptr_cmp:.*]] = icmp ne i32 %[[load]], -1
// CHECK: br i1 %[[memptr_cmp]]
// CHECK: %[[adj:.*]] = sub nsw i32 %[[load]], 0
// CHECK: %[[nv_adj:.*]] = select i1 true, i32 %[[adj]], i32 0
// CHECK: %[[memptr_converted:.*]] = phi i32 [ -1, {{.*}} ], [ %[[nv_adj]], {{.*}} ]