Skip to content

Commit 9227599

Browse files
authored
[NFC][Clang] Fix typo in feature predicate insertion
Due to a botched merge, we currently emit volatile loads from feature predicate globals. These are never foldable, which breaks things. This does not apply to the upstream patch currently under review. Commiting on behalf of github user @AlexVlx
1 parent a76bc2d commit 9227599

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19823,7 +19823,7 @@ static Value *GetOrInsertAMDGPUPredicate(CodeGenFunction &CGF, Twine Name) {
1982319823
P->setExternallyInitialized(true);
1982419824

1982519825
return CGF.Builder.CreateLoad(
19826-
RawAddress(P, PTy, CharUnits::One(), KnownNonNull), true);
19826+
RawAddress(P, PTy, CharUnits::One(), KnownNonNull));
1982719827
}
1982819828

1982919829
Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,

clang/test/CodeGen/amdgpu-builtin-is-invocable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
// AMDGCNSPIRV-LABEL: define spir_func void @foo(
3333
// AMDGCNSPIRV-SAME: ) addrspace(4) #[[ATTR0:[0-9]+]] {
3434
// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]
35-
// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load volatile i1, ptr addrspace(1) @llvm.amdgcn.has.gfx10-insts, align 1
35+
// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i1, ptr addrspace(1) @llvm.amdgcn.has.gfx10-insts, align 1
3636
// AMDGCNSPIRV-NEXT: [[TOBOOL:%.*]] = icmp ne i1 [[TMP0]], false
3737
// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL]], label %[[IF_THEN:.*]], label %[[IF_END:.*]]
3838
// AMDGCNSPIRV: [[IF_THEN]]:

clang/test/CodeGen/amdgpu-builtin-processor-is.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// AMDGCNSPIRV-LABEL: define spir_func void @foo(
3131
// AMDGCNSPIRV-SAME: ) addrspace(4) #[[ATTR0:[0-9]+]] {
3232
// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]
33-
// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load volatile i1, ptr addrspace(1) @llvm.amdgcn.is.gfx900, align 1
33+
// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i1, ptr addrspace(1) @llvm.amdgcn.is.gfx900, align 1
3434
// AMDGCNSPIRV-NEXT: [[TOBOOL:%.*]] = icmp ne i1 [[TMP0]], false
3535
// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL]], label %[[IF_THEN:.*]], label %[[IF_END:.*]]
3636
// AMDGCNSPIRV: [[IF_THEN]]:

0 commit comments

Comments
 (0)