Skip to content

Commit a22f3eb

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:6de04e6fe8b1520ef3e4073ff222e623b7dc9cb9 into amd-gfx:697d8fbeaade
Local branch amd-gfx 697d8fb Merged main:5ab99bf1a757c5ad7115280f374d9af4f1b98bc9 into amd-gfx:02265b523516 Remote branch main 6de04e6 [mlir][bufferization] Adding the optimize-allocation-liveness pass (llvm#101827)
2 parents 697d8fb + 6de04e6 commit a22f3eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2639
-1630
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14370,13 +14370,13 @@ Value *CodeGenFunction::EmitAArch64CpuInit() {
1437014370
}
1437114371

1437214372
Value *CodeGenFunction::EmitRISCVCpuInit() {
14373-
llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, false);
14373+
llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, {VoidPtrTy}, false);
1437414374
llvm::FunctionCallee Func =
1437514375
CGM.CreateRuntimeFunction(FTy, "__init_riscv_feature_bits");
1437614376
auto *CalleeGV = cast<llvm::GlobalValue>(Func.getCallee());
1437714377
CalleeGV->setDSOLocal(true);
1437814378
CalleeGV->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass);
14379-
return Builder.CreateCall(Func);
14379+
return Builder.CreateCall(Func, {llvm::ConstantPointerNull::get(VoidPtrTy)});
1438014380
}
1438114381

1438214382
Value *CodeGenFunction::EmitX86CpuInit() {

clang/test/CodeGen/builtin-cpu-supports.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ int test_ppc(int a) {
250250
// CHECK-RV32-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
251251
// CHECK-RV32-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
252252
// CHECK-RV32-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
253-
// CHECK-RV32-NEXT: call void @__init_riscv_feature_bits()
253+
// CHECK-RV32-NEXT: call void @__init_riscv_feature_bits(ptr null)
254254
// CHECK-RV32-NEXT: [[TMP0:%.*]] = load i64, ptr getelementptr inbounds ({ i32, [1 x i64] }, ptr @__riscv_feature_bits, i32 0, i32 1, i32 0), align 8
255255
// CHECK-RV32-NEXT: [[TMP1:%.*]] = and i64 [[TMP0]], 1
256256
// CHECK-RV32-NEXT: [[TMP2:%.*]] = icmp eq i64 [[TMP1]], 1
@@ -301,7 +301,7 @@ int test_ppc(int a) {
301301
// CHECK-RV64-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
302302
// CHECK-RV64-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
303303
// CHECK-RV64-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
304-
// CHECK-RV64-NEXT: call void @__init_riscv_feature_bits()
304+
// CHECK-RV64-NEXT: call void @__init_riscv_feature_bits(ptr null)
305305
// CHECK-RV64-NEXT: [[TMP0:%.*]] = load i64, ptr getelementptr inbounds ({ i32, [1 x i64] }, ptr @__riscv_feature_bits, i32 0, i32 1, i32 0), align 8
306306
// CHECK-RV64-NEXT: [[TMP1:%.*]] = and i64 [[TMP0]], 1
307307
// CHECK-RV64-NEXT: [[TMP2:%.*]] = icmp eq i64 [[TMP1]], 1

compiler-rt/lib/builtins/cpu_model/riscv.c

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@ struct {
1616

1717
#define RISCV_VENDOR_FEATURE_BITS_LENGTH 1
1818
struct {
19-
unsigned vendorID;
2019
unsigned length;
2120
unsigned long long features[RISCV_VENDOR_FEATURE_BITS_LENGTH];
2221
} __riscv_vendor_feature_bits __attribute__((visibility("hidden"), nocommon));
2322

23+
struct {
24+
unsigned mVendorID;
25+
unsigned mArchID;
26+
unsigned mImplID;
27+
} __riscv_cpu_model __attribute__((visibility("hidden"), nocommon));
28+
2429
// NOTE: Should sync-up with RISCVFeatures.td
2530
// TODO: Maybe generate a header from tablegen then include it.
2631
#define A_GROUPID 0
@@ -244,8 +249,10 @@ static void initRISCVFeature(struct riscv_hwprobe Hwprobes[]) {
244249
// will be cleared to -1, and its value set to 0.
245250
// This unsets all extension bitmask bits.
246251

247-
// Init vendor extension
248-
__riscv_vendor_feature_bits.vendorID = Hwprobes[2].value;
252+
// Init VendorID, ArchID, ImplID
253+
__riscv_cpu_model.mVendorID = Hwprobes[2].value;
254+
__riscv_cpu_model.mArchID = Hwprobes[3].value;
255+
__riscv_cpu_model.mImplID = Hwprobes[4].value;
249256

250257
// Init standard extension
251258
// TODO: Maybe Extension implied generate from tablegen?
@@ -328,14 +335,18 @@ static void initRISCVFeature(struct riscv_hwprobe Hwprobes[]) {
328335

329336
static int FeaturesBitCached = 0;
330337

331-
void __init_riscv_feature_bits() CONSTRUCTOR_ATTRIBUTE;
338+
void __init_riscv_feature_bits(void *) CONSTRUCTOR_ATTRIBUTE;
332339

333340
// A constructor function that sets __riscv_feature_bits, and
334341
// __riscv_vendor_feature_bits to the right values. This needs to run
335342
// only once. This constructor is given the highest priority and it should
336343
// run before constructors without the priority set. However, it still runs
337344
// after ifunc initializers and needs to be called explicitly there.
338-
void CONSTRUCTOR_ATTRIBUTE __init_riscv_feature_bits() {
345+
346+
// PlatformArgs allows the platform to provide pre-computed data and access it
347+
// without extra effort. For example, Linux could pass the vDSO object to avoid
348+
// an extra system call.
349+
void CONSTRUCTOR_ATTRIBUTE __init_riscv_feature_bits(void *PlatformArgs) {
339350

340351
if (FeaturesBitCached)
341352
return;
@@ -345,9 +356,9 @@ void CONSTRUCTOR_ATTRIBUTE __init_riscv_feature_bits() {
345356

346357
#if defined(__linux__)
347358
struct riscv_hwprobe Hwprobes[] = {
348-
{RISCV_HWPROBE_KEY_BASE_BEHAVIOR, 0},
349-
{RISCV_HWPROBE_KEY_IMA_EXT_0, 0},
350-
{RISCV_HWPROBE_KEY_MVENDORID, 0},
359+
{RISCV_HWPROBE_KEY_BASE_BEHAVIOR, 0}, {RISCV_HWPROBE_KEY_IMA_EXT_0, 0},
360+
{RISCV_HWPROBE_KEY_MVENDORID, 0}, {RISCV_HWPROBE_KEY_MARCHID, 0},
361+
{RISCV_HWPROBE_KEY_MIMPID, 0},
351362
};
352363
if (initHwProbe(Hwprobes, sizeof(Hwprobes) / sizeof(Hwprobes[0])))
353364
return;

flang/lib/Lower/OpenMP/ClauseProcessor.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -256,28 +256,6 @@ bool ClauseProcessor::processCollapse(
256256
return found;
257257
}
258258

259-
bool ClauseProcessor::processDefault() const {
260-
if (auto *clause = findUniqueClause<omp::clause::Default>()) {
261-
// Private, Firstprivate, Shared, None
262-
switch (clause->v) {
263-
case omp::clause::Default::DataSharingAttribute::Shared:
264-
case omp::clause::Default::DataSharingAttribute::None:
265-
// Default clause with shared or none do not require any handling since
266-
// Shared is the default behavior in the IR and None is only required
267-
// for semantic checks.
268-
break;
269-
case omp::clause::Default::DataSharingAttribute::Private:
270-
// TODO Support default(private)
271-
break;
272-
case omp::clause::Default::DataSharingAttribute::Firstprivate:
273-
// TODO Support default(firstprivate)
274-
break;
275-
}
276-
return true;
277-
}
278-
return false;
279-
}
280-
281259
bool ClauseProcessor::processDevice(lower::StatementContext &stmtCtx,
282260
mlir::omp::DeviceClauseOps &result) const {
283261
const parser::CharBlock *source = nullptr;

flang/lib/Lower/OpenMP/ClauseProcessor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class ClauseProcessor {
5757
processCollapse(mlir::Location currentLocation, lower::pft::Evaluation &eval,
5858
mlir::omp::LoopRelatedOps &result,
5959
llvm::SmallVectorImpl<const semantics::Symbol *> &iv) const;
60-
bool processDefault() const;
6160
bool processDevice(lower::StatementContext &stmtCtx,
6261
mlir::omp::DeviceClauseOps &result) const;
6362
bool processDeviceType(mlir::omp::DeviceTypeClauseOps &result) const;

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,8 +1055,9 @@ static void genFlushClauses(lower::AbstractConverter &converter,
10551055
if (!objects.empty())
10561056
genObjectList(objects, converter, operandRange);
10571057

1058-
if (!clauses.empty())
1059-
TODO(converter.getCurrentLocation(), "Handle OmpMemoryOrderClause");
1058+
ClauseProcessor cp(converter, semaCtx, clauses);
1059+
cp.processTODO<clause::AcqRel, clause::Acquire, clause::Release,
1060+
clause::SeqCst>(loc, llvm::omp::OMPD_flush);
10601061
}
10611062

10621063
static void
@@ -1096,7 +1097,6 @@ static void genParallelClauses(
10961097
llvm::SmallVectorImpl<const semantics::Symbol *> &reductionSyms) {
10971098
ClauseProcessor cp(converter, semaCtx, clauses);
10981099
cp.processAllocate(clauseOps);
1099-
cp.processDefault();
11001100
cp.processIf(llvm::omp::Directive::OMPD_parallel, clauseOps);
11011101
cp.processNumThreads(stmtCtx, clauseOps);
11021102
cp.processProcBind(clauseOps);
@@ -1129,7 +1129,7 @@ static void genSimdClauses(lower::AbstractConverter &converter,
11291129
cp.processSimdlen(clauseOps);
11301130

11311131
// TODO Support delayed privatization.
1132-
cp.processTODO<clause::Allocate, clause::Linear, clause::Nontemporal>(
1132+
cp.processTODO<clause::Linear, clause::Nontemporal>(
11331133
loc, llvm::omp::Directive::OMPD_simd);
11341134
}
11351135

@@ -1167,15 +1167,15 @@ static void genTargetClauses(
11671167
cp.processIsDevicePtr(clauseOps, devicePtrTypes, devicePtrLocs,
11681168
devicePtrSyms);
11691169
cp.processMap(loc, stmtCtx, clauseOps, &mapSyms, &mapLocs, &mapTypes);
1170-
cp.processThreadLimit(stmtCtx, clauseOps);
11711170

11721171
if (processHostOnlyClauses)
11731172
cp.processNowait(clauseOps);
11741173

1174+
cp.processThreadLimit(stmtCtx, clauseOps);
1175+
11751176
cp.processTODO<clause::Allocate, clause::Defaultmap, clause::Firstprivate,
1176-
clause::InReduction, clause::Reduction,
1177-
clause::UsesAllocators>(loc,
1178-
llvm::omp::Directive::OMPD_target);
1177+
clause::InReduction, clause::UsesAllocators>(
1178+
loc, llvm::omp::Directive::OMPD_target);
11791179

11801180
// `target private(..)` is only supported in delayed privatization mode.
11811181
if (!enableDelayedPrivatizationStaging)
@@ -1223,14 +1223,15 @@ static void genTargetEnterExitUpdateDataClauses(
12231223
cp.processDepend(clauseOps);
12241224
cp.processDevice(stmtCtx, clauseOps);
12251225
cp.processIf(directive, clauseOps);
1226-
cp.processNowait(clauseOps);
12271226

12281227
if (directive == llvm::omp::Directive::OMPD_target_update) {
12291228
cp.processMotionClauses<clause::To>(stmtCtx, clauseOps);
12301229
cp.processMotionClauses<clause::From>(stmtCtx, clauseOps);
12311230
} else {
12321231
cp.processMap(loc, stmtCtx, clauseOps);
12331232
}
1233+
1234+
cp.processNowait(clauseOps);
12341235
}
12351236

12361237
static void genTaskClauses(lower::AbstractConverter &converter,
@@ -1240,7 +1241,6 @@ static void genTaskClauses(lower::AbstractConverter &converter,
12401241
mlir::omp::TaskOperands &clauseOps) {
12411242
ClauseProcessor cp(converter, semaCtx, clauses);
12421243
cp.processAllocate(clauseOps);
1243-
cp.processDefault();
12441244
cp.processDepend(clauseOps);
12451245
cp.processFinal(stmtCtx, clauseOps);
12461246
cp.processIf(llvm::omp::Directive::OMPD_task, clauseOps);
@@ -1279,7 +1279,6 @@ static void genTeamsClauses(lower::AbstractConverter &converter,
12791279
mlir::omp::TeamsOperands &clauseOps) {
12801280
ClauseProcessor cp(converter, semaCtx, clauses);
12811281
cp.processAllocate(clauseOps);
1282-
cp.processDefault();
12831282
cp.processIf(llvm::omp::Directive::OMPD_teams, clauseOps);
12841283
cp.processNumTeams(stmtCtx, clauseOps);
12851284
cp.processThreadLimit(stmtCtx, clauseOps);

llvm/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,8 @@ set(LLVM_USE_STATIC_ZSTD FALSE CACHE BOOL "Use static version of zstd. Can be TR
560560

561561
set(LLVM_ENABLE_CURL "OFF" CACHE STRING "Use libcurl for the HTTP client if available. Can be ON, OFF, or FORCE_ON")
562562

563+
set(LLVM_HAS_LOGF128 "OFF" CACHE STRING "Use logf128 to constant fold fp128 logarithm calls. Can be ON, OFF, or FORCE_ON")
564+
563565
set(LLVM_ENABLE_HTTPLIB "OFF" CACHE STRING "Use cpp-httplib HTTP server library if available. Can be ON, OFF, or FORCE_ON")
564566

565567
set(LLVM_Z3_INSTALL_DIR "" CACHE STRING "Install directory of the Z3 solver.")

llvm/cmake/config-ix.cmake

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,17 @@ else()
247247
set(HAVE_LIBEDIT 0)
248248
endif()
249249

250+
if(LLVM_HAS_LOGF128)
251+
include(CheckCXXSymbolExists)
252+
check_cxx_symbol_exists(logf128 math.h HAS_LOGF128)
253+
254+
if(LLVM_HAS_LOGF128 STREQUAL FORCE_ON AND NOT HAS_LOGF128)
255+
message(FATAL_ERROR "Failed to configure logf128")
256+
endif()
257+
258+
set(LLVM_HAS_LOGF128 "${HAS_LOGF128}")
259+
endif()
260+
250261
# function checks
251262
check_symbol_exists(arc4random "stdlib.h" HAVE_DECL_ARC4RANDOM)
252263
find_package(Backtrace)
@@ -260,12 +271,6 @@ if(C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW)
260271
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unguarded-availability-new")
261272
endif()
262273

263-
check_cxx_symbol_exists(logf128 cmath HAS_LOGF128)
264-
if(HAS_LOGF128)
265-
set(LLVM_HAS_LOGF128 On)
266-
add_compile_definitions(HAS_LOGF128)
267-
endif()
268-
269274
# Determine whether we can register EH tables.
270275
check_symbol_exists(__register_frame "${CMAKE_CURRENT_LIST_DIR}/unwind.h" HAVE_REGISTER_FRAME)
271276
check_symbol_exists(__deregister_frame "${CMAKE_CURRENT_LIST_DIR}/unwind.h" HAVE_DEREGISTER_FRAME)

llvm/include/llvm/ADT/APFloat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class IEEEFloat final : public APFloatBase {
378378
Expected<opStatus> convertFromString(StringRef, roundingMode);
379379
APInt bitcastToAPInt() const;
380380
double convertToDouble() const;
381-
#if defined(HAS_IEE754_FLOAT128)
381+
#ifdef HAS_IEE754_FLOAT128
382382
float128 convertToQuad() const;
383383
#endif
384384
float convertToFloat() const;
@@ -1279,7 +1279,7 @@ class APFloat : public APFloatBase {
12791279
/// \pre The APFloat must be built using semantics, that can be represented by
12801280
/// the host float type without loss of precision. It can be IEEEquad and
12811281
/// shorter semantics, like IEEEdouble and others.
1282-
#if defined(HAS_IEE754_FLOAT128)
1282+
#ifdef HAS_IEE754_FLOAT128
12831283
float128 convertToQuad() const;
12841284
#endif
12851285

llvm/include/llvm/Analysis/LoopAccessAnalysis.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ class RuntimePointerChecking {
486486
Need = false;
487487
Pointers.clear();
488488
Checks.clear();
489+
DiffChecks.clear();
489490
}
490491

491492
/// Insert a pointer and calculate the start and end SCEVs.

llvm/include/llvm/CodeGen/ISDOpcodes.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,26 @@ enum NodeType {
814814

815815
/// TRUNCATE - Completely drop the high bits.
816816
TRUNCATE,
817+
/// TRUNCATE_[SU]SAT_[SU] - Truncate for saturated operand
818+
/// [SU] located in middle, prefix for `SAT` means indicates whether
819+
/// existing truncate target was a signed operation. For examples,
820+
/// If `truncate(smin(smax(x, C), C))` was saturated then become `S`.
821+
/// If `truncate(umin(x, C))` was saturated then become `U`.
822+
/// [SU] located in last indicates whether range of truncated values is
823+
/// sign-saturated. For example, if `truncate(smin(smax(x, C), C))` is a
824+
/// truncation to `i8`, then if value of C ranges from `-128 to 127`, it will
825+
/// be saturated against signed values, resulting in `S`, which will combine
826+
/// to `TRUNCATE_SSAT_S`. If the value of C ranges from `0 to 255`, it will
827+
/// be saturated against unsigned values, resulting in `U`, which will
828+
/// combine to `TRUNATE_SSAT_U`. Similarly, in `truncate(umin(x, C))`, if
829+
/// value of C ranges from `0 to 255`, it becomes `U` because it is saturated
830+
/// for unsigned values. As a result, it combines to `TRUNCATE_USAT_U`.
831+
TRUNCATE_SSAT_S, // saturate signed input to signed result -
832+
// truncate(smin(smax(x, C), C))
833+
TRUNCATE_SSAT_U, // saturate signed input to unsigned result -
834+
// truncate(smin(smax(x, 0), C))
835+
TRUNCATE_USAT_U, // saturate unsigned input to unsigned result -
836+
// truncate(umin(x, C))
817837

818838
/// [SU]INT_TO_FP - These operators convert integers (whose interpreted sign
819839
/// depends on the first letter) to floating point.

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 508397
19+
#define LLVM_MAIN_REVISION 508409
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/include/llvm/Support/float128.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
#ifndef LLVM_FLOAT128
1010
#define LLVM_FLOAT128
1111

12-
#ifndef _GLIBCXX_MATH_H
13-
#include <cmath>
14-
#endif
15-
1612
namespace llvm {
1713

18-
#ifdef HAS_LOGF128
19-
#if !defined(__LONG_DOUBLE_IBM128__) && (__SIZEOF_INT128__ == 16)
20-
typedef decltype(logf128(0.)) float128;
14+
#if defined(__clang__) && defined(__FLOAT128__) && \
15+
defined(__SIZEOF_INT128__) && !defined(__LONG_DOUBLE_IBM128__)
16+
#define HAS_IEE754_FLOAT128
17+
typedef __float128 float128;
18+
#elif defined(__FLOAT128__) && defined(__SIZEOF_INT128__) && \
19+
!defined(__LONG_DOUBLE_IBM128__) && \
20+
(defined(__GNUC__) || defined(__GNUG__))
2121
#define HAS_IEE754_FLOAT128
22+
typedef _Float128 float128;
2223
#endif
23-
#endif // HAS_LOGF128
2424

2525
} // namespace llvm
2626
#endif // LLVM_FLOAT128

llvm/include/llvm/Target/TargetSelectionDAG.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,9 @@ def sext : SDNode<"ISD::SIGN_EXTEND", SDTIntExtendOp>;
477477
def zext : SDNode<"ISD::ZERO_EXTEND", SDTIntExtendOp>;
478478
def anyext : SDNode<"ISD::ANY_EXTEND" , SDTIntExtendOp>;
479479
def trunc : SDNode<"ISD::TRUNCATE" , SDTIntTruncOp>;
480+
def truncssat_s : SDNode<"ISD::TRUNCATE_SSAT_S", SDTIntTruncOp>;
481+
def truncssat_u : SDNode<"ISD::TRUNCATE_SSAT_U", SDTIntTruncOp>;
482+
def truncusat_u : SDNode<"ISD::TRUNCATE_USAT_U", SDTIntTruncOp>;
480483
def bitconvert : SDNode<"ISD::BITCAST" , SDTUnaryOp>;
481484
def addrspacecast : SDNode<"ISD::ADDRSPACECAST", SDTUnaryOp>;
482485
def freeze : SDNode<"ISD::FREEZE" , SDTFreeze>;

llvm/lib/Analysis/BasicAliasAnalysis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,9 @@ struct CastedValue {
354354
}
355355

356356
bool hasSameCastsAs(const CastedValue &Other) const {
357+
if (V->getType() != Other.V->getType())
358+
return false;
359+
357360
if (ZExtBits == Other.ZExtBits && SExtBits == Other.SExtBits &&
358361
TruncBits == Other.TruncBits)
359362
return true;
@@ -1159,8 +1162,6 @@ AliasResult BasicAAResult::aliasGEP(
11591162
APInt &Off = DecompGEP1.Offset;
11601163

11611164
// Initialize for Off >= 0 (V2 <= GEP1) case.
1162-
const Value *LeftPtr = V2;
1163-
const Value *RightPtr = GEP1;
11641165
LocationSize VLeftSize = V2Size;
11651166
LocationSize VRightSize = V1Size;
11661167
const bool Swapped = Off.isNegative();
@@ -1172,7 +1173,6 @@ AliasResult BasicAAResult::aliasGEP(
11721173
// ---------------->|
11731174
// |-->V1Size |-------> V2Size
11741175
// GEP1 V2
1175-
std::swap(LeftPtr, RightPtr);
11761176
std::swap(VLeftSize, VRightSize);
11771177
Off = -Off;
11781178
}

llvm/lib/Analysis/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,9 @@ add_llvm_component_library(LLVMAnalysis
162162
Support
163163
TargetParser
164164
)
165+
166+
include(CheckCXXSymbolExists)
167+
check_cxx_symbol_exists(logf128 math.h HAS_LOGF128)
168+
if(HAS_LOGF128)
169+
target_compile_definitions(LLVMAnalysis PRIVATE HAS_LOGF128)
170+
endif()

0 commit comments

Comments
 (0)