Skip to content

Commit c5886a0

Browse files
author
joaosaffran
committed
fixing tests
1 parent 636802e commit c5886a0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,6 +2104,7 @@ void CodeGenFunction::EmitBranchOnBoolExpr(
21042104
llvm::MDNode::get(CGM.getLLVMContext(), Vals));
21052105
break;
21062106
}
2107+
// This is required to avoid warnings during compilation
21072108
case HLSLControlFlowHintAttr::SpellingNotCalculated:
21082109
break;
21092110
}

llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ static void translateBranchMetadata(Module &M) {
331331
BBTerminatorInst->setMetadata("dx.controlflow.hints", MDNode);
332332
BBTerminatorInst->setMetadata("hlsl.controlflow.hint", nullptr);
333333
}
334-
F.clearMetadata();
335334
}
336335
}
337336

llvm/test/CodeGen/DirectX/HLSLControlFlowHint.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
; CHECK: define i32 @test_branch(i32 %X)
7-
; CHECK-NO: hlsl.controlflow.hint
7+
; CHECK-NOT: hlsl.controlflow.hint
88
; CHECK: br i1 %cmp, label %if.then, label %if.else, !dx.controlflow.hints [[HINT_BRANCH:![0-9]+]]
99
define i32 @test_branch(i32 %X) {
1010
entry:
@@ -34,7 +34,7 @@ if.end: ; preds = %if.else, %if.then
3434

3535

3636
; CHECK: define i32 @test_flatten(i32 %X)
37-
; CHECK-NO: hlsl.controlflow.hint
37+
; CHECK-NOT: hlsl.controlflow.hint
3838
; CHECK: br i1 %cmp, label %if.then, label %if.else, !dx.controlflow.hints [[HINT_FLATTEN:![0-9]+]]
3939
define i32 @test_flatten(i32 %X) {
4040
entry:
@@ -64,8 +64,8 @@ if.end: ; preds = %if.else, %if.then
6464

6565

6666
; CHECK: define i32 @test_no_attr(i32 %X)
67-
; CHECK-NO: hlsl.controlflow.hint
68-
; CHECK-NO: !dx.controlflow.hints
67+
; CHECK-NOT: hlsl.controlflow.hint
68+
; CHECK-NOT: !dx.controlflow.hints
6969
define i32 @test_no_attr(i32 %X) {
7070
entry:
7171
%X.addr = alloca i32, align 4
@@ -91,7 +91,7 @@ if.end: ; preds = %if.else, %if.then
9191
%3 = load i32, ptr %resp, align 4
9292
ret i32 %3
9393
}
94-
; CHECK-NO: hlsl.controlflow.hint
94+
; CHECK-NOT: hlsl.controlflow.hint
9595
; CHECK: [[HINT_BRANCH]] = !{!"dx.controlflow.hints", i32 1}
9696
; CHECK: [[HINT_FLATTEN]] = !{!"dx.controlflow.hints", i32 2}
9797
!0 = !{!"hlsl.controlflow.hint", i32 1}

0 commit comments

Comments
 (0)